diff options
author | Chris Patti <feoh@feoh.org> | 2023-07-24 16:01:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 16:01:36 -0400 |
commit | ea028fe0b55fa15523e85e72d36c78665080d5e3 (patch) | |
tree | ca3172becbcdc34e5545ea15280dab2772bb2cf5 | |
parent | 7da1058748f91b4b227ecef40e4094c9949b41b7 (diff) | |
parent | 29aa5bf42df01c6983c5ea7b464e0535de46f628 (diff) |
Merge pull request #373 from Numkil/patch-1
Allow easier overriding of default filetypes for LSP
-rw-r--r-- | init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 ]] |