summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc20
1 files changed, 10 insertions, 10 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 12721d7..c785a44 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -64,12 +64,13 @@ let g:tokyonight_style = 'night'
colorscheme tokyonight
" ── LSP (yegappan/lsp) ────────────────────────────────────────────────────────
-def g:LspOnSetup()
+def LspOnSetup()
var lspServers = [
{
name: 'rust',
filetype: ['rust'],
path: 'rust-analyzer',
+ args: [],
syncInit: true,
}
]
@@ -78,14 +79,14 @@ enddef
augroup MyLsp
autocmd!
- autocmd User LspSetup call g:LspOnSetup()
+ autocmd User LspSetup call LspOnSetup()
autocmd FileType rust {
- nnoremap <buffer> gd <Cmd>LspGotoDefinition<CR>
- nnoremap <buffer> gD <Cmd>LspGotoDeclaration<CR>
- nnoremap <buffer> gi <Cmd>LspGotoImpl<CR>
- nnoremap <buffer> gr <Cmd>LspShowReferences<CR>
- nnoremap <buffer> gy <Cmd>LspGotoTypeDef<CR>
- nnoremap <buffer> K <Cmd>LspHover<CR>
+ nnoremap <buffer> gd <Cmd>LspGotoDefinition<CR>
+ nnoremap <buffer> gD <Cmd>LspGotoDeclaration<CR>
+ nnoremap <buffer> gi <Cmd>LspGotoImpl<CR>
+ nnoremap <buffer> gr <Cmd>LspShowReferences<CR>
+ nnoremap <buffer> gy <Cmd>LspGotoTypeDef<CR>
+ nnoremap <buffer> K <Cmd>LspHover<CR>
nnoremap <buffer> <leader>lr <Cmd>LspRename<CR>
nnoremap <buffer> <leader>la <Cmd>LspCodeAction<CR>
nnoremap <buffer> <leader>lf <Cmd>LspFormat<CR>
@@ -94,6 +95,7 @@ augroup MyLsp
nnoremap <buffer> ]d <Cmd>LspDiagNext<CR>
nnoremap <buffer> <leader>lo <Cmd>LspOutline<CR>
nnoremap <buffer> <leader>li <Cmd>LspInlayHints toggle<CR>
+ nnoremap <buffer> <leader>ls <Cmd>LspSymSearch<CR>
}
augroup END
@@ -108,8 +110,6 @@ nnoremap <C-l> <C-w>l
" ── Airline ───────────────────────────────────────────────────────────────────
let g:airline_theme = 'tokyonight'
-let g:airline_powerline_fonts = 0 " set to 1 if you have a Nerd Font
-let g:airline#extensions#lsp#enabled = 1
" ── FZF ───────────────────────────────────────────────────────────────────────
" Use ripgrep for :Files if available