Skip to content

Commit 0c339b7

Browse files
nvim: added copilot lsp support
1 parent 17e9ec8 commit 0c339b7

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

.config/cvim/keymap/03_code_completion.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
4848
end
4949
end,
5050
{
51-
desc = 'Apply the currently displayed completion suggestion',
51+
desc = 'Apply the current inline completion suggestion',
5252
expr = true,
5353
buffer = buffer
5454
}

.config/cvim/settings/nvim_lspconfig.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ local function config()
3939
vim_lsp,
4040
"*",
4141
default_capabilities,
42-
{},
42+
{
43+
root_markers = {".git" }
44+
},
4345
{
4446
debounce_text_changes = 200
4547
}
@@ -187,6 +189,14 @@ local function config()
187189
{},
188190
{}
189191
)
192+
-- Github Copilot
193+
setup_lsp(
194+
vim_lsp,
195+
'copilot',
196+
client_lsp_capabilties,
197+
{},
198+
{}
199+
)
190200
end
191201

192202
return {config = config}

.config/cvim/settings/nvim_mason-lspconfig.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ local function config()
1717
"dockerls",
1818
"astro",
1919
'harper_ls',
20+
'copilot',
2021
},
2122
-- For INSTALLED LSPs, automatically enabled LSPs (via vim.lsp.enable(...))
2223
automatic_enable = true

0 commit comments

Comments
 (0)