File tree Expand file tree Collapse file tree 1 file changed +24
-21
lines changed
Expand file tree Collapse file tree 1 file changed +24
-21
lines changed Original file line number Diff line number Diff line change 4141 ( keymap . n "<leader>wl" ( mkRawFn ''print(vim.inspect(vim.lsp.buf.list_workspace_folders()))'' ) "List workspace folders" { } )
4242 ] ;
4343
44- setupWrappers = let
45- capabilities = toLuaObject {
44+ setupWrappers = [
45+ ( str : /* lua */ ''
46+ vim.tbl_deep_extend("force", wrap_lsp_config, ${ str } )
47+ '' )
48+ ] ;
49+ } ;
50+ extraConfigLua = let
51+ wrapConfig = toLuaObject {
52+ on_init = mkRawFn [ "client" "_" ] ''
53+ if vim.fn.has "nvim-0.11" ~= 1 then
54+ if client.supports_method "textDocument/semanticTokens" then
55+ client.server_capabilities.semanticTokensProvider = nil
56+ end
57+ else
58+ if client:supports_method "textDocument/semanticTokens" then
59+ client.server_capabilities.semanticTokensProvider = nil
60+ end
61+ end
62+ '' ;
63+ capabilities = {
4664 textDocument . completion . completionItem = {
4765 documentationFormat = [ "markdown" "plaintext" ] ;
4866 snippetSupport = true ;
6179 } ;
6280 } ;
6381 } ;
64- in [
65- ( str : /* lua */ ''
66- vim.tbl_deep_extend("force", {
67- on_init = function(client, _)
68- if vim.fn.has "nvim-0.11" ~= 1 then
69- if client.supports_method "textDocument/semanticTokens" then
70- client.server_capabilities.semanticTokensProvider = nil
71- end
72- else
73- if client:supports_method "textDocument/semanticTokens" then
74- client.server_capabilities.semanticTokensProvider = nil
75- end
76- end
77- end,
78- capabilities = ${ capabilities }
79- }, ${ str } )
80- '' )
81- ] ;
82- } ;
82+ } ;
83+ in lib . mkBefore /* lua */ ''
84+ local wrap_lsp_config = ${ wrapConfig }
85+ '' ;
8386}
You can’t perform that action at this time.
0 commit comments