This commit is contained in:
Thies Lennart Alff 2025-02-21 14:04:45 +01:00
parent b6b7d0bdc2
commit d72c25c54e
Signed by: lennartalff
GPG key ID: 4EC67D34D594104D
4 changed files with 26 additions and 1 deletions

1
after/ftplugin/c.lua Normal file
View file

@ -0,0 +1 @@
vim.opt_local.shiftwidth = 2

View file

@ -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>')

View file

@ -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,

View file

@ -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 = {