neovim: add lspkind and nnn.vim

This commit is contained in:
FollieHiyuki 2021-07-14 16:23:24 +03:00
parent faaf42a125
commit ec3540565a
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
5 changed files with 38 additions and 8 deletions

View File

@ -113,10 +113,11 @@ wk.register({
-- Normal mode (with leader key) --
-----------------------------------
wk.register({
c = {':ColorizerToggle<CR>', 'Toggle colorizer'},
b = {
name = 'Buffer',
c = {':ColorizerToggle<CR>', 'Colorizer'},
d = {':bdelete<CR>', 'Close buffer'},
f = {':NnnPicker %:p:h<CR>', 'File picker'},
n = {':DashboardNewFile<CR>', 'New file'}
},
@ -195,6 +196,7 @@ wk.register({
-- Tab related
t = {
name = 'Tab',
c = {'<Cmd>tabclose<CR>', 'Close tab'},
n = {'<Cmd>tabnext<CR>', 'Next tab'},
p = {'<Cmd>tabprev<CR>', 'Previous tab'},
t = {'<Cmd>tabnew<CR>', 'New tab'}

View File

@ -120,7 +120,7 @@ for _, server in ipairs(servers) do
end
-- Replace the default lsp diagnostic letters with prettier symbols
-- vim.fn.sign_define('LspDiagnosticsSignError', {text = '', numhl = 'LspDiagnosticsDefaultError'})
-- vim.fn.sign_define('LspDiagnosticsSignWarning', {text = '', numhl = 'LspDiagnosticsDefaultWarning'})
-- vim.fn.sign_define('LspDiagnosticsSignInformation', {text = '', numhl = 'LspDiagnosticsDefaultInformation'})
-- vim.fn.sign_define('LspDiagnosticsSignHint', {text = '', numhl = 'LspDiagnosticsDefaultHint'})
vim.fn.sign_define('LspDiagnosticsSignError', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignWarning', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignInformation', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignHint', {text = ''})

View File

@ -0,0 +1,13 @@
return require('nnn').setup {
set_default_mappings = false,
session = 'global',
layout = {
window = { width = 0.8, height = 0.8, highlight = 'Debug' },
},
command = 'nnn -HUdex',
action = {
['<c-t>'] = 'tab split',
['<c-h>'] = 'split',
['<c-v>'] = 'vsplit'
}
}

View File

@ -107,7 +107,7 @@ gls.left[9] = {
gls.left[10] = {
DiagnosticHint = {
provider = 'DiagnosticHint',
icon = ' ',
icon = ' ',
highlight = {colors.cyan, colors.grey1}
}
}

View File

@ -126,6 +126,13 @@ return require('packer').startup(
require('modules.lsp')
end
}
use {
'onsails/lspkind-nvim',
event = 'BufRead',
config = function()
require('lspkind').init({with_text = false})
end
}
use {
'hrsh7th/nvim-compe',
event = 'InsertEnter',
@ -290,7 +297,15 @@ return require('packer').startup(
}
-- Just for benchmarking
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'}
-- File picker, since Telescope file browser doesn't support dotfiles
use {
'mcchrish/nnn.vim',
cmd = 'NnnPicker',
config = function()
require('modules.picker')
end
}
-- TODO: trouble.nvim, lspsaga, orgmode.nvim, lspkind, TrueZen/zen-mode, nvim-lint, vim-spectre, nvim-dap, hop.nvim, dial.nvim, asynctasks.nvim
-- TODO: trouble.nvim, lspsaga, orgmode.nvim, TrueZen/zen-mode, nvim-lint, vim-spectre, nvim-dap, hop.nvim, dial.nvim, asynctasks.nvim
end
)