Update nvim cmp configuration
This commit is contained in:
parent
b9ecf18e52
commit
b00d8052d3
@ -85,7 +85,7 @@ vim.keymap.set('n', '<c-k>', '<c-w>k')
|
|||||||
vim.keymap.set('n', '<c-l>', '<c-w>l')
|
vim.keymap.set('n', '<c-l>', '<c-w>l')
|
||||||
|
|
||||||
-- Use <leader>-[y|p] to yank to or put from the system clipboard
|
-- Use <leader>-[y|p] to yank to or put from the system clipboard
|
||||||
vim.keymap.set('n', '<leader>y', '"+y', { desc = 'Yank to system clipboard' })
|
vim.keymap.set('v', '<leader>y', '"+y', { desc = 'Yank to system clipboard' })
|
||||||
vim.keymap.set('n', '<leader>p', '"+p', { desc = 'Put from system clipboard' })
|
vim.keymap.set('n', '<leader>p', '"+p', { desc = 'Put from system clipboard' })
|
||||||
|
|
||||||
-- Use <esc> or <C-c> to clear search highlights
|
-- Use <esc> or <C-c> to clear search highlights
|
||||||
@ -267,14 +267,21 @@ require('lazy').setup({
|
|||||||
|
|
||||||
{
|
{
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
-- Ruby
|
-- Ruby
|
||||||
lspconfig.ruby_lsp.setup({})
|
lspconfig.ruby_lsp.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
|
||||||
-- Lua
|
-- Lua
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
@ -284,7 +291,9 @@ require('lazy').setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- JavaScript/TypeScript
|
-- JavaScript/TypeScript
|
||||||
lspconfig.ts_ls.setup({})
|
lspconfig.ts_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -310,6 +319,7 @@ require('lazy').setup({
|
|||||||
'hrsh7th/cmp-buffer',
|
'hrsh7th/cmp-buffer',
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
'hrsh7th/cmp-cmdline',
|
'hrsh7th/cmp-cmdline',
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
@ -332,7 +342,9 @@ require('lazy').setup({
|
|||||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'vsnip' },
|
{ name = 'vsnip' },
|
||||||
|
{ name = 'path' },
|
||||||
}, {
|
}, {
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
}),
|
}),
|
||||||
@ -341,8 +353,9 @@ require('lazy').setup({
|
|||||||
cmp.setup.cmdline(':', {
|
cmp.setup.cmdline(':', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'buffer' }
|
{ name = 'path' },
|
||||||
}
|
{ name = 'cmdline' },
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
28
nvim/lazy-lock.json
Normal file
28
nvim/lazy-lock.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
|
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "ee0606259ee5d5dd40398be26755048e8965086e" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "25d16aab7d29ca940a9feb92e6bb734697417009" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||||
|
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "a91cd95f50bf991106403cb02c5851b92e45820e" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
|
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
||||||
|
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||||
|
"vim-sneak": { "branch": "master", "commit": "18b1faf020e6a66c1ce09b3ff5e6b6feb182973b" },
|
||||||
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
|
"vim-vsnip": { "branch": "master", "commit": "0a4b8419e44f47c57eec4c90df17567ad4b1b36e" }
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user