update
This commit is contained in:
parent
b6b7d0bdc2
commit
d72c25c54e
4 changed files with 26 additions and 1 deletions
1
after/ftplugin/c.lua
Normal file
1
after/ftplugin/c.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
|
@ -51,3 +51,5 @@ vim.keymap.set('n', '<leader>dgl', "<cmd>diffget REMOTE<cr>")
|
||||||
-- stay in visual mode after indenting/dedenting
|
-- stay in visual mode after indenting/dedenting
|
||||||
vim.keymap.set('v', '<', '<gv')
|
vim.keymap.set('v', '<', '<gv')
|
||||||
vim.keymap.set('v', '>', '>gv')
|
vim.keymap.set('v', '>', '>gv')
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<C-n>', '<cmd>Neotree<cr>')
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ return {
|
||||||
'klen/nvim-config-local',
|
'klen/nvim-config-local',
|
||||||
opts = {
|
opts = {
|
||||||
config_files = { '.nvim.lua' },
|
config_files = { '.nvim.lua' },
|
||||||
hasfile = vim.fn.stdpath('data') .. '/config-local',
|
hashfile = vim.fn.stdpath('data') .. '/config-local',
|
||||||
autocommands_create = true,
|
autocommands_create = true,
|
||||||
commands_create = true,
|
commands_create = true,
|
||||||
lookup_parents = true,
|
lookup_parents = true,
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,28 @@ local handlers = {
|
||||||
function(server)
|
function(server)
|
||||||
require('lspconfig')[server].setup({})
|
require('lspconfig')[server].setup({})
|
||||||
end,
|
end,
|
||||||
|
clangd = function()
|
||||||
|
require('lspconfig').clangd.setup({
|
||||||
|
cmd = {
|
||||||
|
"clangd",
|
||||||
|
"--background-index",
|
||||||
|
"--suggest-missing-includes",
|
||||||
|
'--query-driver=/usr/bin/*gcc,/usr/bin/*g++',
|
||||||
|
},
|
||||||
|
filetypes = {
|
||||||
|
"c", "cpp", "objc", "objcpp", "cuda", "proto"
|
||||||
|
},
|
||||||
|
capabilities = {
|
||||||
|
offsetEncoding = {"utf-8", "utf-16"},
|
||||||
|
textDocument = {
|
||||||
|
completion = {
|
||||||
|
editsNearCursor = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
single_file_support = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
pylsp = function()
|
pylsp = function()
|
||||||
require('lspconfig').pylsp.setup({
|
require('lspconfig').pylsp.setup({
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue