update nvim config

This commit is contained in:
ksyasuda 2022-06-25 23:35:18 -07:00
parent 2fbf5e0909
commit 93411a86c5
5 changed files with 18 additions and 24 deletions

View File

@ -81,14 +81,9 @@ if has('nvim')
Plug 'nvim-lua/plenary.nvim' Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/popup.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" Plug 'zbirenbaum/copilot.lua'
" Plug 'zbirenbaum/copilot-cmp'
" Plug 'nvim-telescope/telescope.nvim'
" Plug 'TimUntersberger/neogit'
Plug 'akinsho/bufferline.nvim' Plug 'akinsho/bufferline.nvim'
Plug 'andweeb/presence.nvim' Plug 'andweeb/presence.nvim'
Plug 'f-person/git-blame.nvim'
Plug 'folke/which-key.nvim' Plug 'folke/which-key.nvim'
Plug 'glepnir/dashboard-nvim' Plug 'glepnir/dashboard-nvim'
Plug 'kyazdani42/nvim-tree.lua' Plug 'kyazdani42/nvim-tree.lua'
@ -146,7 +141,6 @@ if has('nvim')
source ~/.config/nvim/plugin-confs/bufferline.lua source ~/.config/nvim/plugin-confs/bufferline.lua
source ~/.config/nvim/plugin-confs/dashboard-art.vim source ~/.config/nvim/plugin-confs/dashboard-art.vim
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
source ~/.config/nvim/plugin-confs/git-blame.lua
source ~/.config/nvim/plugin-confs/gitsigns.lua source ~/.config/nvim/plugin-confs/gitsigns.lua
source ~/.config/nvim/plugin-confs/lspfuzzy.lua source ~/.config/nvim/plugin-confs/lspfuzzy.lua
source ~/.config/nvim/plugin-confs/lualine.lua source ~/.config/nvim/plugin-confs/lualine.lua
@ -166,7 +160,7 @@ if has('nvim')
source ~/.config/nvim/plugin-confs/nvim-cmp.lua source ~/.config/nvim/plugin-confs/nvim-cmp.lua
source ~/.config/nvim/plugin-confs/fidget.lua source ~/.config/nvim/plugin-confs/fidget.lua
source ~/.config/nvim/plugin-confs/symbols-outline.lua source ~/.config/nvim/plugin-confs/symbols-outline.lua
source ~/.config/nvim/plugin-confs/trouble.lua " source ~/.config/nvim/plugin-confs/trouble.lua
" nvim and vim plugins " nvim and vim plugins
source ~/.vim/plugin-confs/floaterm.vim source ~/.vim/plugin-confs/floaterm.vim
@ -263,9 +257,10 @@ command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0) \ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
command! -bang -nargs=? -complete=dir AllFiles command! -bang -nargs=? -complete=dir AllFiles
\ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore', 'options': ['--layout=reverse', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)) \ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore', 'options': ['--layout=reverse', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0))
command! Lines call fzf#vim#lines(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse']}), <bang>0) command! -bang -nargs=? -complete=dir Lines
\ call fzf#vim#lines(<q-args>, ({'options': ['--layout=reverse']}), <bang>0)
command! -bang -nargs=? -complete=dir Buffers command! -bang -nargs=? -complete=dir Buffers
\ call fzf#vim#buffers(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0) \ call fzf#vim#buffers(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)

View File

@ -26,7 +26,7 @@ nmap gDc :lua vim.lsp.buf.declaration()<CR>
nmap gDf :lua vim.lsp.buf.definition()<CR> nmap gDf :lua vim.lsp.buf.definition()<CR>
nmap gF :edit <cfile><cr> nmap gF :edit <cfile><cr>
nmap gT :lua vim.lsp.buf.type_definition()<CR> nmap gT :lua vim.lsp.buf.type_definition()<CR>
nmap gb :lua vim.lsp.buf.document_symbol()<CR> nmap gb :Gitsigns blame_line<CR>
" nmap gd :lua vim.lsp.buf.definition()<CR> " nmap gd :lua vim.lsp.buf.definition()<CR>
nmap gi :lua vim.lsp.buf.implementation()<CR> nmap gi :lua vim.lsp.buf.implementation()<CR>
nmap gl :lua vim.lsp.buf.code_lens()<CR> nmap gl :lua vim.lsp.buf.code_lens()<CR>
@ -56,7 +56,7 @@ nmap <silent> <Leader>fa :DashboardFindWord<CR>
nmap <silent> <Leader>fb :DashboardJumpMark<CR> nmap <silent> <Leader>fb :DashboardJumpMark<CR>
nmap <silent> <Leader>fh :DashboardFindHistory<CR> nmap <silent> <Leader>fh :DashboardFindHistory<CR>
nmap <leader>gb :GitBlameToggle<CR> nmap <leader>gb :Gitsigns blame_line<CR>
nmap <leader>gc :Commits<CR> nmap <leader>gc :Commits<CR>
nmap <leader>gf :GitFiles<CR> nmap <leader>gf :GitFiles<CR>
" nmap <leader>gg :Neogit<CR> " nmap <leader>gg :Neogit<CR>
@ -123,11 +123,11 @@ nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR> nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR> nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr> " nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
nnoremap <leader>xl <cmd>TroubleToggle loclist<cr> " nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr> " nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr> " nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
nnoremap <leader>xx <cmd>TroubleToggle<cr> " nnoremap <leader>xx <cmd>TroubleToggle<cr>
nmap <leader>y "+ nmap <leader>y "+
vmap <leader>y "+ vmap <leader>y "+

View File

@ -6,29 +6,27 @@ cfg = {
bind = true, -- This is mandatory, otherwise border config won't get registered. bind = true, -- This is mandatory, otherwise border config won't get registered.
-- If you want to hook lspsaga or other signature handler, pls set to false -- If you want to hook lspsaga or other signature handler, pls set to false
doc_lines = 10, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated); doc_lines = 12, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
-- set to 0 if you DO NOT want any API comments be shown -- set to 0 if you DO NOT want any API comments be shown
-- This setting only take effect in insert mode, it does not affect signature help in normal -- This setting only take effect in insert mode, it does not affect signature help in normal
-- mode, 10 by default -- mode, 10 by default
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note: floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note:
-- will set to true when fully tested, set to false will use whichever side has more space -- will set to true when fully tested, set to false will use whichever side has more space
-- this setting will be helpful if you do not want the PUM and floating win overlap -- this setting will be helpful if you do not want the PUM and floating win overlap
floating_window_off_x = 1, -- adjust float windows x position. floating_window_off_x = 1, -- adjust float windows x position.
floating_window_off_y = 1, -- adjust float windows y position. floating_window_off_y = -1, -- adjust float windows y position.
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
hint_enable = true, -- virtual hint enable hint_enable = true, -- virtual hint enable
hint_prefix = "", -- Panda for parameter hint_prefix = "", -- Panda for parameter
hint_scheme = "String", hint_scheme = "String",
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
max_height = 12, -- max height of signature floating_window, if content is more than max_height, you can scroll down max_height = 15, -- max height of signature floating_window, if content is more than max_height, you can scroll down
-- to view the hiding contents -- to view the hiding contents
max_width = 40, -- max_width of signature floating_window, line will be wrapped if exceed max_width max_width = 85, -- max_width of signature floating_window, line will be wrapped if exceed max_width
handler_opts = { handler_opts = {
border = "rounded" -- double, rounded, single, shadow, none border = "rounded" -- double, rounded, single, shadow, none
}, },

View File

@ -185,7 +185,7 @@ lsp_installer.on_server_ready(function(server)
end) end)
local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'rust_analyzer', 'clangd', 'ansiblels' } local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'sumneko_lua', 'rust_analyzer', 'clangd', 'ansiblels' }
for _, lsp in pairs(servers) do for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup { require('lspconfig')[lsp].setup {
on_attach = on_attach, on_attach = on_attach,
@ -196,4 +196,4 @@ for _, lsp in pairs(servers) do
} }
end end
require 'lspconfig'.bashls.setup {} -- require 'lspconfig'.bashls.setup {}

View File

@ -43,6 +43,7 @@ require("null-ls").setup({
}), }),
null_ls.builtins.formatting.black, null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort, null_ls.builtins.formatting.isort,
-- null_ls.builtins.formatting.tidy
}, },
}) })