nvim improvement and nnn color bug workaround
This commit is contained in:
+2
-1
@@ -67,7 +67,8 @@ n ()
|
||||
|
||||
# The command builtin allows one to alias nnn to n, if desired, without
|
||||
# making an infinitely recursive alias
|
||||
command nnn -C -a "$@"
|
||||
# command nnn -C -a "$@"
|
||||
NNN_COLORS=44444444 command nnn -D -a "$@"
|
||||
|
||||
[ ! -f "$NNN_TMPFILE" ] || {
|
||||
. "$NNN_TMPFILE"
|
||||
|
||||
@@ -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 })
|
||||
|
||||
-- nvim-tree
|
||||
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', '<C-b>', '<cmd>NvimTreeToggle <CR>', { noremap = true })
|
||||
-- vim.api.nvim_set_keymap('n', '<leader>b', ':NvimTreeResize ', { noremap = true })
|
||||
|
||||
-- Telescope
|
||||
vim.keymap.set('n', '<C-l>', builtin.find_files, {})
|
||||
|
||||
@@ -85,3 +85,21 @@ vim.cmd([[
|
||||
-- colorscheme default
|
||||
-- ]])
|
||||
-- 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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user