From: AnonymousCoward Date: Thu, 23 Dec 2021 00:13:16 +0000 (-0500) Subject: Edit page memo/vimrc-local-diff X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=331ca15eaf18943a94fd0e4583725ae644012466;p=wiki.git Edit page memo/vimrc-local-diff --- diff --git a/memo/vimrc-local-diff b/memo/vimrc-local-diff new file mode 100644 index 0000000..3a7e1fd --- /dev/null +++ b/memo/vimrc-local-diff @@ -0,0 +1,49 @@ +diff --git a/.vimrc.local b/.vimrc.local +index 2e4df902a0..ae29eec37f 100644 +--- a/.vimrc.local ++++ b/.vimrc.local +@@ -1,4 +1,4 @@ +-set updatetime=4000 ++set updatetime=300 + set shortmess+=c + + if has('persistent_undo') +@@ -241,6 +241,7 @@ local on_attach = function(client, bufnr) + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + ++ buf_set_option('formatexpr', 'v:lua.vim.lsp.formatexpr()') + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + vim.opt.completeopt = {'menuone', 'noselect'} + +@@ -251,7 +252,7 @@ local on_attach = function(client, bufnr) + local opts = { noremap=true, silent=true } + -- See `:help vim.lsp.*` for documentation on any of the below functions + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) +- buf_set_keymap('n', '', 'lua vim.lsp.buf.declaration()', opts) ++ buf_set_keymap('n', '', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) +@@ -276,10 +277,11 @@ lspconfig.tsserver.setup{ on_attach = on_attach, capabilities = capabilities, } + lspconfig.clangd.setup{ + on_attach = on_attach, + capabilities = capabilities, +- -- cmd = { vim.loop.os_homedir() .. "clangd", "--background-index" }, ++ -- cmd = { vim.loop.os_homedir() .. "bin/clangd", "--background-index" }, + cmd = { "clangd", "--background-index" }, + root_dir = lspconfig.util.root_pattern("compile_commands.json", "compile_flags.txt"), + } ++lspconfig.pylsp.setup{ on_attach = on_attach, capabilities = capabilities, } + + ENDLUA + +@@ -288,8 +290,6 @@ autocmd FileType c,cpp,rust highlight ExtraWhitespace ctermbg=red guibg=red + " Format on write for Rust + " autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 200) + +-" runtime! python_setup.vim +- + set inccommand=nosplit + set signcolumn=number + \ No newline at end of file