@@ -37,38 +37,38 @@ require('blink.cmp').setup {
37
37
},
38
38
documentation = {
39
39
auto_show = true ,
40
- auto_show_delay_ms = 500 ,
40
+ },
41
+ },
42
+ signature = {
43
+ enabled = true ,
44
+ window = {
45
+ show_documentation = false ,
41
46
},
42
47
},
43
48
}
44
49
45
- local blink_capabilities = require (' blink.cmp' ).get_lsp_capabilities ()
46
-
47
50
require (' mason' ).setup ()
48
51
require (' mason-lspconfig' ).setup {
49
52
ensure_installed = {},
50
53
automatic_installation = false ,
51
54
handlers = {
52
55
function (server_name ) -- default handler for servers that don't require custom setup
53
- require (' lspconfig' )[server_name ].setup {
54
- capabilities = blink_capabilities
55
- }
56
+ vim .lsp .enable (server_name )
56
57
end ,
57
58
jsonls = function ()
58
- require (' lspconfig' ).jsonls .setup {
59
- capabilities = blink_capabilities ,
59
+ vim .lsp .config (' jsonls' , {
60
60
settings = {
61
61
json = {
62
62
schemas = require (' schemastore' ).json .schemas (),
63
63
validate = { enable = true },
64
64
},
65
- },
66
- }
65
+ }
66
+ })
67
+ vim .lsp .enable (' jsonls' )
67
68
end ,
68
69
yamlls = function ()
69
- require ( ' lspconfig ' ). yamlls . setup ( require (' yaml-companion' ).setup {
70
+ vim . lsp . config ( ' yamlls ' , require (' yaml-companion' ).setup {
70
71
lspconfig = {
71
- capabilities = require (' blink.cmp' ).get_lsp_capabilities (),
72
72
settings = {
73
73
yaml = {
74
74
format = { enable = false },
@@ -77,15 +77,16 @@ require('mason-lspconfig').setup {
77
77
},
78
78
},
79
79
})
80
+ vim .lsp .enable (' yamlls' )
80
81
end ,
81
82
terraformls = function ()
82
- require (' lspconfig' ).terraformls .setup {
83
- capabilities = blink_capabilities ,
83
+ vim .lsp .config (' terraformls' , {
84
84
-- disable this lsp server syntax highlighting, it's garbage compared to what treesitter provides
85
85
on_init = function (client )
86
86
client .server_capabilities .semanticTokensProvider = nil
87
87
end ,
88
- }
88
+ })
89
+ vim .lsp .enable (' terraformls' )
89
90
end ,
90
91
}
91
92
}
@@ -95,11 +96,8 @@ vim.api.nvim_create_autocmd('User', {
95
96
group = vim .api .nvim_create_augroup (' copilot-suggestion-hide' , { clear = true }),
96
97
pattern = ' BlinkCmpMenuOpen' ,
97
98
callback = function ()
99
+ require (' copilot.suggestion' ).dismiss ()
98
100
vim .b .copilot_suggestion_hidden = true
99
- local copilot = require (' copilot.suggestion' )
100
- if copilot .is_visible () then
101
- copilot .dismiss ()
102
- end
103
101
end ,
104
102
})
105
103
@@ -114,7 +112,7 @@ vim.api.nvim_create_autocmd('User', {
114
112
115
113
vim .api .nvim_create_autocmd (' LspAttach' , {
116
114
desc = ' LSP configuration' ,
117
- group = vim .api .nvim_create_augroup (' lsp-attach-configuration' , { clear = true }),
115
+ group = vim .api .nvim_create_augroup (' lsp-attach-configuration' , { clear = false }),
118
116
callback = function (event )
119
117
local client = vim .lsp .get_client_by_id (event .data .client_id )
120
118
if client and client :supports_method (vim .lsp .protocol .Methods .textDocument_formatting ) then
0 commit comments