nvim improvement and nnn color bug workaround

This commit is contained in:
Matt Anderson
2026-11-19 16:16:49 -06:00
parent 20a0d5785d
commit 9702d7b598
3 changed files with 22 additions and 3 deletions
+2 -1
View File
@@ -67,7 +67,8 @@ n ()
# The command builtin allows one to alias nnn to n, if desired, without # The command builtin allows one to alias nnn to n, if desired, without
# making an infinitely recursive alias # making an infinitely recursive alias
command nnn -C -a "$@" # command nnn -C -a "$@"
NNN_COLORS=44444444 command nnn -D -a "$@"
[ ! -f "$NNN_TMPFILE" ] || { [ ! -f "$NNN_TMPFILE" ] || {
. "$NNN_TMPFILE" . "$NNN_TMPFILE"
+2 -2
View File
@@ -13,8 +13,8 @@ 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, {})
+18
View File
@@ -85,3 +85,21 @@ vim.cmd([[
-- colorscheme default -- colorscheme default
-- ]]) -- ]])
-- autocmd ColorScheme * highlight Folded cterm=italic ctermfg=lightgray ctermbg=18 -- autocmd ColorScheme * highlight Folded cterm=italic ctermfg=lightgray ctermbg=18
-- The native completion documentation popup does not inherit 'winborder'.
vim.api.nvim_create_autocmd("CompleteChanged", {
group = vim.api.nvim_create_augroup("CompletionDocBorder", { clear = true }),
callback = function()
local function set_border()
-- Neovim returns preview_winid together with the selected item.
local win = vim.fn.complete_info({ "selected" }).preview_winid
if win and win > 0 and vim.api.nvim_win_is_valid(win) then
vim.api.nvim_win_set_config(win, { border = "single" })
end
end
vim.schedule(set_border)
-- LSP documentation can arrive after the selection changes.
vim.defer_fn(set_border, 300)
end,
})