summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2024-10-16 15:16:19 +0100
committerMichaël Ball <michael.ball@krotosaudio.com>2024-10-16 15:16:19 +0100
commitfe35291b6d9622c7a6006bbada43ccc559e06ad6 (patch)
treed1656b7c995623dfa00c142b196f118bcd1a22d5
parentc4703607d7608790c13aa95027315e211193cd16 (diff)
All sorts of neovim updates
-rw-r--r--neovim/.config/nvim/lua/plugins/neogit.lua8
-rw-r--r--neovim/.config/nvim/lua/plugins/noice.lua34
-rw-r--r--neovim/.config/nvim/lua/plugins/nvim_cmp.lua21
3 files changed, 48 insertions, 15 deletions
diff --git a/neovim/.config/nvim/lua/plugins/neogit.lua b/neovim/.config/nvim/lua/plugins/neogit.lua
index a0a3f90..43dcf02 100644
--- a/neovim/.config/nvim/lua/plugins/neogit.lua
+++ b/neovim/.config/nvim/lua/plugins/neogit.lua
@@ -7,11 +7,8 @@ return {
'sindrets/diffview.nvim',
},
opts = {
- disable_commit_confirmation = true,
- auto_refresh = true,
- kind = 'tab',
commit_editor = {
- kind = 'auto',
+ staged_diff_split_kind = "auto",
},
integrations = {
-- Neogit only provides inline diffs. If you want a more traditional way to look at diffs, you can use `sindrets/diffview.nvim`.
@@ -26,7 +23,8 @@ return {
-- }
-- }
--
- diffview = true
+ diffview = true,
+ telescope = true,
}
},
keys = {
diff --git a/neovim/.config/nvim/lua/plugins/noice.lua b/neovim/.config/nvim/lua/plugins/noice.lua
index 11bee05..09b628e 100644
--- a/neovim/.config/nvim/lua/plugins/noice.lua
+++ b/neovim/.config/nvim/lua/plugins/noice.lua
@@ -22,6 +22,10 @@ return {
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
+ popupmenu = {
+ enabled = true,
+ backend = "nui",
+ },
views = {
cmdline_popup = {
position = {
@@ -53,16 +57,28 @@ return {
},
},
routes = {
- filter = {
- event = 'lsp',
- kind = 'progress',
- cond = function(message)
- local client = vim.tbl_get(message.opts, 'progress', 'client')
- return client == 'null-ls'
- end,
+ {
+ filter = {
+ event = 'lsp',
+ kind = 'progress',
+ cond = function(message)
+ local client = vim.tbl_get(message.opts, 'progress', 'client')
+ return client == 'null-ls'
+ end,
+ },
+ opts = {
+ skip = true,
+ },
},
- opts = {
- skip = true,
+ {
+ filter = {
+ event = 'msg_show',
+ kind = '',
+ find = 'written',
+ },
+ opts = {
+ skip = true,
+ },
},
},
},
diff --git a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua
index f0a4f95..fb7aaab 100644
--- a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua
+++ b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua
@@ -40,6 +40,17 @@ return {
local cmp = require('cmp')
local lspkind = require('lspkind')
cmp.setup({
+ enabled = function()
+ -- disable completion in comments
+ local context = require 'cmp.config.context'
+ -- keep command mode completion enabled when cursor is in a comment
+ if vim.api.nvim_get_mode().mode == 'c' then
+ return true
+ else
+ return not context.in_treesitter_capture("comment")
+ and not context.in_syntax_group("Comment")
+ end
+ end,
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
@@ -88,10 +99,18 @@ return {
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
+ view = {
+ entries = { name = 'wildmenu', separator = '|' },
+ },
sources = cmp.config.sources({
{ name = 'path' }
}, {
- { name = 'cmdline' }
+ {
+ name = 'cmdline',
+ option = {
+ ignore_cmds = { 'Man', '!' },
+ },
+ },
})
})
end,