-
For context, I'm using nvchad. Here's my lspconfig file local configs = require("nvchad.configs.lspconfig")
local on_attach = configs.on_attach
local on_init = configs.on_init
local capabilities = configs.capabilities
local lspconfig = require("lspconfig")
-- if you just want default config for the servers then put them in a table
local servers = { "html", "cssls", "tsserver", "clangd", "pyright" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
on_init = on_init,
on_attach = on_attach,
capabilities = capabilities,
})
end
|
Beta Was this translation helpful? Give feedback.
Answered by
mrcjkb
Apr 12, 2024
Replies: 1 comment 7 replies
-
Hey 👋 Tip See the TIP box in the readme's Quick setup section 😄 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to be able to put it anywhere, as long as it's sourced before the plugin initialises (which is on
ftplugin
after you open a rust file).If it's not working, it could be that nvchad is doing something funky, so I would suggest asking there.
I did find this discussion, maybe it will help you:
NvChad/NvChad#2594