From 9c45ddfd696065ebcae872cfed286962ffbd5b47 Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Tue, 14 Mar 2023 16:51:40 +0100 Subject: [PATCH 1/5] set title to filename --- nvim/lua/globals_opts.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nvim/lua/globals_opts.lua b/nvim/lua/globals_opts.lua index 039e670..5ae29f7 100644 --- a/nvim/lua/globals_opts.lua +++ b/nvim/lua/globals_opts.lua @@ -1,4 +1,5 @@ local set = vim.opt +set.title = true set.modelines = 0 set.hidden = true set.number = true From 52cf202a77d5fdbde5e989d7756950653272a02b Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Tue, 14 Mar 2023 16:51:50 +0100 Subject: [PATCH 2/5] git branches hotkey --- nvim/lua/keymap.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nvim/lua/keymap.lua b/nvim/lua/keymap.lua index c56b040..6f59a5b 100644 --- a/nvim/lua/keymap.lua +++ b/nvim/lua/keymap.lua @@ -33,6 +33,7 @@ nmap("fg", "lua require('telescope.builtin').live_grep()") nmap("fb", "lua require('telescope.builtin').buffers()") nmap("fh", "lua require('telescope.builtin').help_tags()") nmap("ff", "lua require('telescope.builtin').find_files()") +nmap("vb", "lua require('telescope.builtin').git_branches()") nmap("b","lua require('telescope.builtin').buffers()") nmap("",":NvimTreeToggle") From 46d18355c7e3c8ad841e10ee176e90dc0ebdb878 Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Tue, 14 Mar 2023 16:52:04 +0100 Subject: [PATCH 3/5] deactivate sumneko_lua --- nvim/lua/new_lsp_conf.lua | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/nvim/lua/new_lsp_conf.lua b/nvim/lua/new_lsp_conf.lua index c96ecdb..ff13796 100644 --- a/nvim/lua/new_lsp_conf.lua +++ b/nvim/lua/new_lsp_conf.lua @@ -30,11 +30,15 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.format, bufopts) + + if vim.bo[bufnr].buftype ~= "" or vim.bo[bufnr].filetype == "helm" then + vim.diagnostic.disable() + end end local lsp_flags = { -- This is the default in Nvim 0.7+ - debounce_text_changes = 150, + debounce_text_changes = 250, } local capabilities = require('cmp_nvim_lsp').default_capabilities( vim.lsp.protocol.make_client_capabilities() @@ -47,7 +51,7 @@ require('mason-lspconfig').setup_handlers { capabilities = capabilities } end, - ['rust_analyzer'] = function() + ['rust_analyzer'] = function() local rustToolsOpts = { tools = { inlay_hints = { @@ -62,7 +66,7 @@ require('mason-lspconfig').setup_handlers { capabilities = capabilities, flags = lsp_flags, settings = { - ["rust_analyzer"] = { + ["rust_analyzer"] = { checkOnSave = { command = "clippy" } @@ -78,23 +82,34 @@ require('mason-lspconfig').setup_handlers { flags = lsp_flags, -- server-specific settings... settings = { - ["rust-analyzer"] = {} + ["rust-analyzer"] = {} } } end, - ['sumneko_lua'] = function() - require('lspconfig')["sumneko_lua"].setup { + ['yamlls'] = function() + require('lspconfig')["yamlls"].setup { on_attach = on_attach, flags = lsp_flags, settings = { - Lua = { - diagnostics = { - globals = { "vim" } - } + yaml = { + schemas = { kubernetes = "globPattern" }, } } } - end, + end + -- ['sumneko_lua'] = function() + -- require('lspconfig')["sumneko_lua"].setup { + -- on_attach = on_attach, + -- flags = lsp_flags, + -- settings = { + -- Lua = { + -- diagnostics = { + -- globals = { "vim" } + -- } + -- } + -- } + -- } + -- end, } --require('lspconfig')['rust_analyzer'].setup { -- on_attach = on_attach, @@ -104,4 +119,4 @@ require('mason-lspconfig').setup_handlers { -- ["rust-analyzer"] = {} -- } --} -require"fidget".setup{} +require "fidget".setup {} From 99761650d006272a346598c5964b1c768f90ed7f Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Tue, 14 Mar 2023 16:52:23 +0100 Subject: [PATCH 4/5] add vim surround and vim helm --- nvim/lua/plugins.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 5bd559f..e3dbca7 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -110,8 +110,10 @@ require("packer").startup(function(use) use 'simrat39/symbols-outline.nvim' use 'j-hui/fidget.nvim' use { - 'ThyW/todotxt.nvim', - branch = "vim-ui-input", - requires = {'MunifTanjim/nui.nvim'}, -} + 'ThyW/todotxt.nvim', + branch = "vim-ui-input", + requires = { 'MunifTanjim/nui.nvim' }, + } + use 'tpope/vim-surround' + use 'towolf/vim-helm' end) From 8f3a41bd449014e0f3d9f8704f937ae7c9c30f32 Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Tue, 14 Mar 2023 16:52:36 +0100 Subject: [PATCH 5/5] open with trouble hotkey --- nvim/lua/telescope_config.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nvim/lua/telescope_config.lua b/nvim/lua/telescope_config.lua index 54637cd..3a857c0 100644 --- a/nvim/lua/telescope_config.lua +++ b/nvim/lua/telescope_config.lua @@ -1,6 +1,11 @@ require('telescope').load_extension('lsp_handlers') +local trouble = require('trouble.providers.telescope') require('telescope').setup({ defaults={ + mappings={ + i = { [""] = trouble.open_with_trouble }, + n = { [""] = trouble.open_with_trouble }, + }, path_display={"smart"}, }, pickers={