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.

40 lines
806 B

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. })
  17. lsp.configure("efm", {
  18. settings = {
  19. languages = {
  20. sh = "shellcheck -x"
  21. }
  22. },
  23. filetypes = { "sh" }
  24. })
  25. lsp.on_attach(function(client, bufnr)
  26. local opts = { buffer = bufnr, remap = false }
  27. vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
  28. end)
  29. lsp.setup()
  30. vim.diagnostic.config({
  31. virtual_text = true,
  32. underline = true,
  33. float = true,
  34. })