simplify neovim config to use native lsp and dap with minimal plugins

This commit is contained in:
Matt Anderson
2026-07-28 12:52:28 -05:00
parent e85d124e24
commit 5f23a14f6d
16 changed files with 174 additions and 191 deletions
+1 -1
View File
@@ -1 +1 @@
k9s/.config/k9s/clusters/** ./k9s/.config/k9s/clusters
@@ -0,0 +1,4 @@
benchmarks:
defaults:
concurrency: 2
requests: 200
@@ -0,0 +1,15 @@
k9s:
cluster: arn:aws:eks:us-west-2:008675491430:cluster/dp-cluster-msg133
namespace:
active: msgdp-dev2
lockFavorites: false
favorites:
- all
- msgdp-dev2
- qa4-automation-dp
- default
view:
active: v1/pods
featureGates:
nodeShell: false
proxy: null
@@ -0,0 +1,4 @@
benchmarks:
defaults:
concurrency: 2
requests: 200
@@ -0,0 +1,12 @@
k9s:
cluster: default
namespace:
active: default
lockFavorites: false
favorites:
- default
view:
active: po
featureGates:
nodeShell: false
proxy: null
@@ -0,0 +1,4 @@
benchmarks:
defaults:
concurrency: 2
requests: 200
@@ -0,0 +1,18 @@
k9s:
cluster: kubernetes
namespace:
active: cp-automation-bmdp
lockFavorites: false
favorites:
- cp-automation-bmdp
- vdp
- cp-automation-dp
- all
- cp1-ns
- default
- nperf12-my-ns
view:
active: v1/namespaces
featureGates:
nodeShell: false
proxy: null
+1 -1
View File
@@ -13,7 +13,7 @@ k9s:
reactive: false reactive: false
noIcons: false noIcons: false
defaultsToFullScreen: false defaultsToFullScreen: false
skin: default-light skin: default-dark
skipLatestRevCheck: false skipLatestRevCheck: false
disablePodCounting: false disablePodCounting: false
shellPod: shellPod:
+1
View File
@@ -0,0 +1 @@
/Users/matt/doc/dev/pro/ftl-dev/msg-ftl/hydra/golang/src/tibco.com/ftlui/client
+1
View File
@@ -0,0 +1 @@
/Users/matt/doc/dev/pro/ftl-dev
+1
View File
@@ -0,0 +1 @@
/Users/matt/doc/dev/pro/platform-dev
+12 -20
View File
@@ -1,26 +1,18 @@
{ {
"LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" }, "gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" },
"auto-dark-mode.nvim": { "branch": "main", "commit": "54058b4fe414bd64bd2904a6f8a63f1f14e3d8df" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
"helm-ls.nvim": { "branch": "main", "commit": "f0b9a1723890971a6d84890b50dbf5f40974ea1b" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nnn.nvim": { "branch": "master", "commit": "efe690293eee87558f034a83ed96157e52639cdb" }, "nnn.nvim": { "branch": "master", "commit": "efe690293eee87558f034a83ed96157e52639cdb" },
"nvim": { "branch": "main", "commit": "7365b8dede43a82ed1df741275b75333422e5402" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-dap": { "branch": "master", "commit": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, "nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" },
"nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" }, "nvim-lspconfig": { "branch": "master", "commit": "7ab79bb1b57160a537f427ac8a6026102f12b701" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-tree.lua": { "branch": "master", "commit": "4213bd6eabac38b16dd6615002b6243b23cf3bf6" },
"nvim-tree.lua": { "branch": "master", "commit": "9197f3ee3f0c9a754aab5b16500db6d7da5f68fd" }, "nvim-treesitter": { "branch": "main", "commit": "61df84986b4b4ec469ee745a182e433d49f8c27e" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "orgmode": { "branch": "master", "commit": "f32a06d4b5399dad8bf0478c772bf6c513f02dcf" },
"orgmode": { "branch": "master", "commit": "9deee54eb3dfc0fc2aebb3346c317ed198f423cb" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, "telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" },
"zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" } "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" }
} }
+38 -104
View File
@@ -1,12 +1,4 @@
-- Add additional capabilities supported by nvim-cmp -- Enable language servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
vim.lsp.config('*', {
capabilities = capabilities,
})
-- Enable some language servers with the additional completion capabilities
local servers = { 'lua_ls', 'pyright', 'gopls', 'clangd', 'helm_ls', 'bashls', 'angularls', 'djls' } local servers = { 'lua_ls', 'pyright', 'gopls', 'clangd', 'helm_ls', 'bashls', 'angularls', 'djls' }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
vim.lsp.enable(lsp) vim.lsp.enable(lsp)
@@ -63,102 +55,44 @@ vim.lsp.config('yamlls', {
}) })
vim.lsp.enable('yamlls') vim.lsp.enable('yamlls')
-- DAP Setup
vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, { -- require('dap-python').setup('~/venv/bin/python')
pattern = "*.jenkinsfile", -- require('dap-go').setup()
command = "set filetype=groovy"
})
-- luasnip setup
local luasnip = require('luasnip')
-- nvim-cmp setup
local cmp = require('cmp')
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
-- C-b (back) C-f (forward) for snippet placeholder navigation.
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'orgmode' },
},
window = {
completion = {
style = "minimal",
border = "rounded",
winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None',
},
documentation = {
style = "minimal",
border = "rounded",
winhighlight = 'Normal:Normal,FloatBorder:FloatBorder'
}
},
}
vim.o.winborder = "rounded"
-- Global mappings. -- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions -- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float) -- vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) -- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next) -- vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist) -- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
vim.api.nvim_set_keymap('i', '<c-n>', '<c-x><c-o>', { noremap = true, silent = true }) -- vim.api.nvim_set_keymap('i', '<c-n>', '<c-x><c-o>', { noremap = true, silent = true })
-- Use LspAttach autocommand to only map the following keys --- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer --- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', { -- vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}), -- group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev) -- callback = function(ev)
-- Enable completion triggered by <c-x><c-o> -- -- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' -- vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
--
-- Buffer local mappings. -- -- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions -- -- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf } -- local opts = { buffer = ev.buf }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) -- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) -- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) -- vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) -- vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts) -- vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts) -- vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<space>wl', function() -- vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) -- print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts) -- end, opts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts) -- vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts) -- vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts) -- vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) -- vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<space>f', function() -- vim.keymap.set('n', '<space>f', function()
vim.lsp.buf.format { async = true } -- vim.lsp.buf.format { async = true }
end, opts) -- end, opts)
end, -- end,
}) -- })
+2 -13
View File
@@ -13,17 +13,14 @@ vim.api.nvim_set_keymap('n', '<C-f>', ':NnnPicker %:p:h<CR>', { noremap = true }
vim.api.nvim_set_keymap('t', '<C-f>', '<cmd>NnnPicker %:p:h<CR>', { noremap = true }) vim.api.nvim_set_keymap('t', '<C-f>', '<cmd>NnnPicker %:p:h<CR>', { noremap = true })
-- nvim-tree -- nvim-tree
vim.api.nvim_set_keymap('n', '<C-b>', '<cmd>NvimTreeToggle <CR>', { noremap = true }) -- vim.api.nvim_set_keymap('n', '<C-b>', '<cmd>NvimTreeToggle <CR>', { noremap = true })
vim.api.nvim_set_keymap('n', '<leader>b', ':NvimTreeResize ', { noremap = true }) -- vim.api.nvim_set_keymap('n', '<leader>b', ':NvimTreeResize ', { noremap = true })
-- Telescope -- Telescope
vim.keymap.set('n', '<C-l>', builtin.find_files, {}) vim.keymap.set('n', '<C-l>', builtin.find_files, {})
vim.keymap.set('n', '<C-k>', builtin.live_grep, {}) vim.keymap.set('n', '<C-k>', builtin.live_grep, {})
vim.keymap.set('n', '<C-p>', builtin.commands, {}) vim.keymap.set('n', '<C-p>', builtin.commands, {})
-- etc
vim.keymap.set('n', '?', ':WhichKey<CR>', {})
-- zen mode -- zen mode
vim.keymap.set('n', '<leader>z', ':ZenMode<CR>', { silent = true }) vim.keymap.set('n', '<leader>z', ':ZenMode<CR>', { silent = true })
@@ -52,11 +49,3 @@ vim.keymap.set('n', '<F10>', function() require('dap').step_over() end)
vim.keymap.set('n', '<F11>', function() require('dap').step_into() end) vim.keymap.set('n', '<F11>', function() require('dap').step_into() end)
vim.keymap.set('n', '<F12>', function() require('dap').step_out() end) vim.keymap.set('n', '<F12>', function() require('dap').step_out() end)
vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end) vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end)
-- Copilot
vim.api.nvim_set_keymap('n', '<C-C>', ':CopilotChatToggle <CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('i', '<C-J>', 'copilot#Accept("<CR>")', { expr=true, noremap = true, silent = true })
vim.keymap.set('i', '<C-H>', '<Plug>(copilot-accept-word)', { noremap=true, silent=true })
vim.keymap.set("i", "<C-U>", '<Plug>(copilot-next)', { noremap=true, silent=true })
vim.keymap.set("i", "<C-B>", '<Plug>(copilot-previous)', { noremap=true, silent=true })
vim.g.copilot_no_tab_map = true
+22 -37
View File
@@ -14,19 +14,11 @@ vim.opt.rtp:prepend(lazypath)
-- Install Plugins -- Install Plugins
require('lazy').setup({ require('lazy').setup({
-- Core
'williamboman/mason.nvim',
-- LSP -- LSP
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-nvim-lsp',
'folke/neodev.nvim',
'qvalentin/helm-ls.nvim',
{ 'L3MON4D3/LuaSnip', version = 'v2.1.0' },
-- DAP -- DAP
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
'rcarriga/nvim-dap-ui', 'rcarriga/nvim-dap-ui',
'nvim-neotest/nvim-nio',
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
'luukvbaal/nnn.nvim', 'luukvbaal/nnn.nvim',
@@ -108,8 +100,6 @@ require('lazy').setup({
}) })
-- Initialize Plugins -- Initialize Plugins
require("mason").setup()
require('neodev').setup()
-- require("tree-sitter-manager").setup() -- require("tree-sitter-manager").setup()
require('nnn').setup({ require('nnn').setup({
picker = { picker = {
@@ -118,28 +108,28 @@ require('nnn').setup({
fullscreen = false, fullscreen = false,
}, },
}) })
local function tree_on_attach(bufnr) -- local function tree_on_attach(bufnr)
local api = require('nvim-tree.api') -- local api = require('nvim-tree.api')
api.config.mappings.default_on_attach(bufnr) -- api.config.mappings.default_on_attach(bufnr)
vim.keymap.del('n', '<C-e>', { buffer = bufnr }) -- vim.keymap.del('n', '<C-e>', { buffer = bufnr })
vim.keymap.set("n", "<M-h>", function() api.tree.resize({ relative = -5 }) end, { buffer = bufnr }) -- vim.keymap.set("n", "<M-h>", function() api.tree.resize({ relative = -5 }) end, { buffer = bufnr })
vim.keymap.set("n", "<M-l>", function() api.tree.resize({ relative = 5 }) end, { buffer = bufnr }) -- vim.keymap.set("n", "<M-l>", function() api.tree.resize({ relative = 5 }) end, { buffer = bufnr })
end -- end
require('nvim-tree').setup({ -- require('nvim-tree').setup({
on_attach = tree_on_attach, -- on_attach = tree_on_attach,
renderer = { -- renderer = {
full_name = true, -- full_name = true,
}, -- },
view = { -- view = {
side = "left", -- side = "left",
}, -- },
tab = { -- tab = {
sync = { -- sync = {
open = true, -- open = true,
close = true, -- close = true,
}, -- },
}, -- },
}) -- })
require('telescope').setup({ require('telescope').setup({
defaults = { defaults = {
file_ignore_patterns = { file_ignore_patterns = {
@@ -157,8 +147,3 @@ require('telescope').setup({
}) })
require("telescope").load_extension("ui-select") require("telescope").load_extension("ui-select")
require('nvim-autopairs').setup() require('nvim-autopairs').setup()
-- require('which-key').setup()
-- DAP Setup
-- require('dap-python').setup('~/venv/bin/python')
require('dap-go').setup()
+38 -15
View File
@@ -10,22 +10,8 @@ vim.wo.number = true
vim.wo.relativenumber = true vim.wo.relativenumber = true
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.o.splitright = true vim.o.splitright = true
vim.o.maxmempattern = 100000
-- Highlighting for orgmode files with highlight.nvim
vim.api.nvim_create_autocmd("ColorScheme", {
callback = function()
local cursorline = vim.api.nvim_get_hl(0, { name = "CursorLine" })
local sep = vim.api.nvim_get_hl(0, { name = "WinSeparator" }).fg
or vim.api.nvim_get_hl(0, { name = "Comment" }).fg
vim.api.nvim_set_hl(0, "Headline1", { bg = cursorline.bg, underline = true, sp = sep })
vim.api.nvim_set_hl(0, "Headline2", { bg = cursorline.bg, underline = true, sp = sep })
vim.api.nvim_set_hl(0, "Headline3", { bg = cursorline.bg, underline = true, sp = sep })
vim.api.nvim_set_hl(0, "Headline4", { bg = cursorline.bg, underline = true, sp = sep })
end,
})
-- Global colorscheme based on terminal colors
vim.cmd([[ vim.cmd([[
autocmd ColorScheme * highlight Statement cterm=bold ctermfg=5 autocmd ColorScheme * highlight Statement cterm=bold ctermfg=5
autocmd ColorScheme * highlight Keyword ctermfg=5 autocmd ColorScheme * highlight Keyword ctermfg=5
@@ -36,8 +22,45 @@ vim.cmd([[
autocmd ColorScheme * highlight Comment cterm=italic ctermfg=lightgray autocmd ColorScheme * highlight Comment cterm=italic ctermfg=lightgray
autocmd ColorScheme * highlight Visual cterm=reverse ctermfg=NONE ctermbg=NONE autocmd ColorScheme * highlight Visual cterm=reverse ctermfg=NONE ctermbg=NONE
" Completion popup
autocmd ColorScheme * highlight! link Pmenu Normal
autocmd ColorScheme * highlight! link PmenuKind Normal
autocmd ColorScheme * highlight! link PmenuExtra Normal
autocmd ColorScheme * highlight! link PmenuMatch Normal
autocmd ColorScheme * highlight! link PmenuBorder Normal
" Selected completion
autocmd ColorScheme * highlight! PmenuSel cterm=reverse ctermfg=NONE ctermbg=NONE
autocmd ColorScheme * highlight! link PmenuKindSel PmenuSel
autocmd ColorScheme * highlight! link PmenuExtraSel PmenuSel
autocmd ColorScheme * highlight! link PmenuMatchSel PmenuSel
" Documentation and other floating windows
autocmd ColorScheme * highlight! link NormalFloat Normal
autocmd ColorScheme * highlight! link FloatBorder Normal
syntax on syntax on
set notermguicolors set notermguicolors
set pumborder=rounded
set winborder=rounded
colorscheme default colorscheme default
]]) ]])
-- Global colorscheme based on terminal colors
-- vim.cmd([[
-- autocmd ColorScheme * highlight Statement cterm=bold ctermfg=5
-- autocmd ColorScheme * highlight Keyword ctermfg=5
-- autocmd ColorScheme * highlight Type ctermfg=6
-- autocmd ColorScheme * highlight Function cterm=bold ctermfg=4
-- autocmd ColorScheme * highlight Constant ctermfg=3
-- autocmd ColorScheme * highlight String ctermfg=2
-- autocmd ColorScheme * highlight Comment cterm=italic ctermfg=lightgray
-- autocmd ColorScheme * highlight Visual cterm=reverse ctermfg=NONE ctermbg=NONE
--
-- syntax on
-- set notermguicolors
-- colorscheme default
-- ]])
-- autocmd ColorScheme * highlight Folded cterm=italic ctermfg=lightgray ctermbg=18 -- autocmd ColorScheme * highlight Folded cterm=italic ctermfg=lightgray ctermbg=18