summaryrefslogtreecommitdiffstats
path: root/nvim
diff options
context:
space:
mode:
authorNumkil <merel.jossart@outlook.com>2023-07-24 20:41:14 +0200
committerNumkil <merel.jossart@outlook.com>2023-07-24 21:57:36 +0200
commitacd1ad6e2d8e3ac5b6e9b21a4c662c507a252006 (patch)
tree1c3f19db90bd73192fa0eeebbe6b90825dc5394c /nvim
parent4df69457f188686771ad0b61c92c32e427f7b097 (diff)
downloaddots-acd1ad6e2d8e3ac5b6e9b21a4c662c507a252006.tar.gz
setup more language servers i use + allow customizing filetypes
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index 859d9d2..e5cbed9 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -424,12 +424,16 @@ end
--
-- Add any additional override configuration in the following tables. They will be passed to
-- the `settings` field of the server config. You must look up that documentation yourself.
+--
+-- If you want to override the default filetypes that your language server will attach to you can
+-- define the property 'filetypes' to the map in question.
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- tsserver = {},
+ -- html = { filetypes = { 'html', 'twig', 'hbs'} },
lua_ls = {
Lua = {
@@ -459,8 +463,9 @@ mason_lspconfig.setup_handlers {
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name],
+ filetypes = servers[server_name].filetypes,
}
- end,
+ end
}
-- [[ Configure nvim-cmp ]]