cleanup config

This commit is contained in:
elkowar 2021-04-04 15:04:29 +02:00
parent ed20de4485
commit d6d42a3852
4 changed files with 28 additions and 61 deletions

View file

@ -4,6 +4,7 @@
nvim aniseed.nvim
lsp lspconfig
saga lspsaga
utils utils
compe compe}
@ -12,16 +13,17 @@
(fn on_attach [client bufnr]
(if client.resolved_capabilities.document_highlight
(do
(utils.highlight "LspReferenceRead" {:gui "underline"})
(utils.highlight "LspReferenceText" {:gui "underline"})
(utils.highlight "LspReferenceWrite" {:gui "underline"})
(vim.api.nvim_exec
"hi LspReferenceRead cterm=bold ctermbg=red guibg='#8ec07c' guifg='#282828'
hi LspReferenceText cterm=bold ctermbg=red guibg='#8ec07c' guifg='#282828'
hi LspReferenceWrite cterm=bold ctermbg=red guibg='#8ec07c' guifg='#282828'
augroup lsp_document_highlight
"augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END"
false)))
false))))
(lsp.rust_analyzer.setup { :on_attach on_attach })
@ -68,3 +70,11 @@
:scroll_up "<C-u>"
:scroll_down "<C-d>"}})
(utils.highlight "LspSagaCodeActionTitle" {:fg "#8ec07c"})
(utils.highlight "LspSagaBorderTitle" {:fg "#8ec07c"})
(utils.highlight "LspSagaCodeActionContent" {:fg "#8ec07c"})
(utils.highlight "LspSagaFinderSelection" {:fg "#8ec07c"})
(utils.highlight "LspSagaDiagnosticHeader" {:fg "#8ec07c"})
(set nvim.o.signcolumn "yes")

View file

@ -53,8 +53,11 @@
(defn highlight [group colset]
(nvim.command (.. "hi " group " guifg='" colset.fg "' guibg='" colset.bg "' gui=NONE")))
(let [default { :fg "NONE" :bg "NONE" :gui "NONE"}
opts (a.merge default colset)]
(nvim.command (.. "hi! "group" guifg='"opts.fg"' guibg='"opts.bg"' gui='"opts.gui"'"))))
(defn comp [f g ...]
(f (g ...)))
(defn comp [f g]
(fn [...]
(f (g ...))))

View file

@ -9,8 +9,6 @@
let g:vim_config_root = expand('<sfile>:p:h')
let $VIM_ROOT = g:vim_config_root
let g:vimspector_enable_mappings = 'HUMAN'
source $VIM_ROOT/plugins.vim

View file

@ -10,7 +10,6 @@ call plug#begin('~/.vim/plugged')
Plug 'akinsho/nvim-bufferline.lua'
Plug 'Olical/aniseed', { 'tag': 'v3.16.0' }
Plug 'bakpakin/fennel.vim'
" general purpose lua wrappers for nvim stuff
Plug 'norcalli/nvim.lua'
@ -19,15 +18,10 @@ call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-repeat'
Plug 'junegunn/goyo.vim', {'on': 'Goyo'}
"Plug 'osyo-manga/vim-over', {'on': 'OverCommandLine'} " Substitute preview
Plug 'liuchengxu/vim-which-key'
if has('nvim') || has('patch-8.0.902')
Plug 'mhinz/vim-signify'
else
Plug 'mhinz/vim-signify', { 'branch': 'legacy' }
endif
Plug 'tpope/vim-fugitive'
@ -35,21 +29,11 @@ call plug#begin('~/.vim/plugged')
Plug 'glepnir/galaxyline.nvim'
"Plug 'vim-airline/vim-airline-themes'
"Plug 'vim-airline/vim-airline'
" buffer line
if has('nvim')
"Plug 'romgrk/barbar.nvim'
endif
"Plug 'morhetz/gruvbox'
Plug 'gruvbox-community/gruvbox'
Plug 'godlygeek/tabular' " :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block.
Plug 'tpope/vim-surround'
"Plug 'easymotion/vim-easymotion' " press <leader>f [somekey] to have quick-movement to any occurrence of the key
Plug 'christoomey/vim-tmux-navigator' " good integration with tmux pane switching
Plug 'nathanaelkane/vim-indent-guides' " Can be toggled using <leader>ig (intent-guides)
@ -59,16 +43,10 @@ call plug#begin('~/.vim/plugged')
Plug 'mg979/vim-visual-multi'
Plug 'hauleth/sad.vim' " Use siw instead of ciw. when using . afterwards, will find the next occurrence of the changed word and change it too
Plug 'wellle/targets.vim' " more text objects. IE: cin) (change in next parens). generally better handling of surrounding objects.
"Plug 'haya14busa/incsearch.vim' " Show search result-highlights whilst typing the query
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Fuzzy file opener, use: :FZF or :FZF! for fullscreen
Plug 'junegunn/fzf.vim'
Plug 'unblevable/quick-scope' " highlight targets when pressing f<character>
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } " :MarkdownPreview for live markdown preview
"Plug 'jiangmiao/auto-pairs'
Plug 'machakann/vim-highlightedyank'
Plug 'ciaranm/detectindent'
@ -78,22 +56,10 @@ call plug#begin('~/.vim/plugged')
Plug 'editorconfig/editorconfig-vim'
Plug 'honza/vim-snippets'
Plug 'liuchengxu/vista.vim'
Plug 'antoinemadec/coc-fzf'
Plug 'tommcdo/vim-exchange'
if !has('nvim')
Plug 'puremourning/vimspector'
endif
Plug 'svermeulen/vim-yoink'
Plug 'Shougo/echodoc.vim'
Plug 'kien/rainbow_parentheses.vim'
Plug 'bhurlow/vim-parinfer'
@ -103,7 +69,6 @@ call plug#begin('~/.vim/plugged')
" Language Plugins ----------------------------------------------------- {{{
Plug 'ziglang/zig.vim'
Plug 'bduggan/vim-raku'
Plug 'LnL7/vim-nix'
@ -116,8 +81,6 @@ call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot' " Syntax highlighting for most languages
"Plug 'mattn/emmet-vim'
Plug 'udalov/kotlin-vim'
Plug 'purescript-contrib/purescript-vim'
Plug 'HerringtonDarkholme/yats.vim' " typescript syntax highlighting
@ -125,20 +88,13 @@ call plug#begin('~/.vim/plugged')
"" Haskell
Plug 'neovimhaskell/haskell-vim'
Plug 'Twinside/vim-hoogle', {'on': 'Hoogle'}
" Rust
Plug 'rust-lang/rust.vim'
Plug 'mattn/webapi-vim'
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'thyrgle/vim-dyon'
Plug 'bakpakin/fennel.vim'
Plug 'tjdevries/nlua.nvim'
"Plug 'nvim-lua/completion-nvim'
"Plug 'mxw/vim-prolog'