diff --git a/.vimrc b/.vimrc index 23ae7b5..a63422b 100644 --- a/.vimrc +++ b/.vimrc @@ -7,6 +7,16 @@ set backspace=indent,eol,start set grepprg=rg\ --vimgrep\ --smart-case\ --follow set clipboard+=unnamedplus +" Indents word-wrapped lines as much as the 'parent' line +set wrap +set breakindent +" Ensures word-wrap does not split words +set formatoptions=l +set lbr + + + + " Set colorscheme colorscheme codedark @@ -91,8 +101,6 @@ call plug#begin('~/.vim/plugged') Plug 'tomasiser/vim-code-dark' - Plug 'dense-analysis/ale' - Plug 'preservim/nerdtree' Plug 'mbbill/undotree' @@ -121,10 +129,24 @@ call plug#begin('~/.vim/plugged') Plug 'vim-airline/vim-airline-themes' if has('nvim') + Plug 'nvim-lua/plenary.nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter-context' + + + Plug 'neovim/nvim-lspconfig' + Plug 'nvim-lua/completion-nvim' + + " :MasonUpdate updates registry contents + Plug 'williamboman/mason.nvim', { 'do': ':MasonUpdate' } + Plug 'jose-elias-alvarez/null-ls.nvim' + + endif + + + " if has('nvim') " Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " else @@ -137,22 +159,7 @@ call plug#begin('~/.vim/plugged') call plug#end() - -let g:ale_linters = { -\ 'python': ['flake8'], -\ } - -let g:ale_fixers = { -\ '*': ['remove_trailing_lines', 'trim_whitespace'], -\ 'javascript': ['prettier_eslint'], -\ 'css': ['prettier'], -\ 'python': ['black', 'isort'] -\} - -let g:ale_fix_on_save = 1 - -let g:ale_sign_error = '●' -let g:ale_sign_warning = '.' +luafile ~/.vim/lsp_config.lua " call deoplete#custom#option('sources', { @@ -238,6 +245,11 @@ nmap ]e vmap [egv vmap ]egv +nmap ]e +nmap [e +vmap ]egv +vmap [egv + " fzf specific mappings nnoremap b :Buffer nnoremap :Files @@ -279,6 +291,22 @@ nnoremap :UndotreeToggle nmap (ale_next_wrap) +" lspconfig mappings + +nnoremap gd lua vim.lsp.buf.definition() +nnoremap gi lua vim.lsp.buf.implementation() +nnoremap gr lua vim.lsp.buf.references() +nnoremap gD lua vim.lsp.buf.declaration() +nnoremap ge lua vim.lsp.diagnostic.set_loclist() +nnoremap K lua vim.lsp.buf.hover() +nnoremap f lua vim.lsp.buf.formatting() +nnoremap rn lua vim.lsp.buf.rename() + +nnoremap a lua vim.lsp.buf.code_action() +xmap a lua vim.lsp.buf.range_code_action() + + + " }}} " VIMSCRIPT ----------------------------------------------------------------- {{{