Neovim configs for 2023. Hopefully they last.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
818 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. -- Learn the keybindings, see :help lsp-zero-keybindings
  2. -- Learn to configure LSP servers, see :help lsp-zero-api-showcase
  3. local lsp = require('lsp-zero')
  4. local lspconfig = require('lspconfig');
  5. lsp.preset('recommended')
  6. -- (Optional) Configure lua language server for neovim
  7. lsp.nvim_workspace()
  8. lsp.ensure_installed({
  9. 'tailwindcss',
  10. 'tsserver',
  11. 'texlab',
  12. 'pyright',
  13. 'sumneko_lua',
  14. 'efm',
  15. 'ltex',
  16. 'jsonls'
  17. })
  18. lsp.configure("efm", {
  19. settings = {
  20. languages = {
  21. sh = "shellcheck -x"
  22. }
  23. },
  24. filetypes = { "sh" }
  25. })
  26. lsp.on_attach(function(client, bufnr)
  27. local opts = { buffer = bufnr, remap = false }
  28. vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
  29. end)
  30. lsp.setup()
  31. vim.diagnostic.config({
  32. virtual_text = true,
  33. underline = true,
  34. float = true,
  35. })