chore: update vim config
This commit is contained in:
parent
4ce727a7d8
commit
bf04575365
|
@ -3,10 +3,7 @@ let g:maplocalleader = ','
|
|||
|
||||
set termguicolors
|
||||
syntax on
|
||||
|
||||
|
||||
set hidden
|
||||
|
||||
" set hidden
|
||||
|
||||
" Always show the signcolumn
|
||||
if has("patch-8.1.1564")
|
||||
|
@ -33,6 +30,7 @@ Plug 'glepnir/dashboard-nvim'
|
|||
|
||||
Plug 'hoob3rt/lualine.nvim'
|
||||
|
||||
Plug 'simrat39/rust-tools.nvim'
|
||||
" One Dark Pro
|
||||
Plug 'joshdick/onedark.vim'
|
||||
|
||||
|
@ -136,6 +134,13 @@ nnoremap <leader>r :NvimTreeRefresh<CR>
|
|||
nnoremap <leader>n :NvimTreeFindFile<CR>
|
||||
" NvimTreeOpen and NvimTreeClose are also available if you need them
|
||||
|
||||
" Inverse tab in insert mode
|
||||
inoremap <S-Tab> <C-d>
|
||||
|
||||
" Remove search highlight on double escape
|
||||
nnoremap <esc><esc> :nohlsearch<CR>
|
||||
|
||||
|
||||
|
||||
" a list of groups can be found at `:help nvim_tree_highlight`
|
||||
highlight NvimTreeFolderIcon guibg=blue
|
||||
|
@ -148,7 +153,35 @@ lua << EOF
|
|||
|
||||
local nvim_lsp = require'lspconfig'
|
||||
nvim_lsp.pyright.setup{}
|
||||
nvim_lsp.rust_analyzer.setup{}
|
||||
|
||||
local opts = { noremap=true, silent=true }
|
||||
vim.api.nvim_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>d', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
|
||||
|
||||
|
||||
|
||||
-- Rust Tools
|
||||
require'rust-tools'.setup{
|
||||
hover_actions = {
|
||||
-- the border that is used for the hover window
|
||||
-- see vim.api.nvim_open_win()
|
||||
border = {
|
||||
{"╭", "FloatBorder"},
|
||||
{"─", "FloatBorder"},
|
||||
{"╮", "FloatBorder"},
|
||||
{"│", "FloatBorder"},
|
||||
{"╯", "FloatBorder"},
|
||||
{"─", "FloatBorder"},
|
||||
{"╰", "FloatBorder"},
|
||||
{"│", "FloatBorder"}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Tree Sitter Config
|
||||
|
||||
|
|
Loading…
Reference in New Issue