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.

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