diff options
-rw-r--r-- | nvim/.config/nvim/coc-settings.json | 15 | ||||
-rw-r--r-- | nvim/.config/nvim/ftplugin/scheme.vim | 1 | ||||
-rw-r--r-- | nvim/.config/nvim/init.vim | 39 | ||||
-rw-r--r-- | nvim/.config/nvim/plugin/statusline.vim | 30 |
4 files changed, 46 insertions, 39 deletions
diff --git a/nvim/.config/nvim/coc-settings.json b/nvim/.config/nvim/coc-settings.json index 8515224..c5a12f1 100644 --- a/nvim/.config/nvim/coc-settings.json +++ b/nvim/.config/nvim/coc-settings.json | |||
@@ -37,12 +37,15 @@ | |||
37 | } | 37 | } |
38 | }, | 38 | }, |
39 | "haskell": { | 39 | "haskell": { |
40 | "command": "hie", | 40 | "command": "haskell-language-server-wrapper", |
41 | "args": ["--lsp"], | 41 | "args": ["--lsp"], |
42 | "rootPatterns": [ | 42 | "rootPatterns": [ |
43 | "*.cabal", | ||
43 | "stack.yaml", | 44 | "stack.yaml", |
44 | "cabal.config", | 45 | "cabal.project", |
45 | "package.yaml" | 46 | "cabal.project.local", |
47 | "package.yaml", | ||
48 | "hie.yaml" | ||
46 | ], | 49 | ], |
47 | "filetypes": [ | 50 | "filetypes": [ |
48 | "hs", | 51 | "hs", |
@@ -51,9 +54,13 @@ | |||
51 | ], | 54 | ], |
52 | "initializationOptions": { | 55 | "initializationOptions": { |
53 | "languageServerHaskell": { | 56 | "languageServerHaskell": { |
54 | "hlintOn": true | 57 | "hlintOn": true |
55 | } | 58 | } |
56 | } | 59 | } |
60 | }, | ||
61 | "lua": { | ||
62 | "command": "lua-lsp", | ||
63 | "filetypes": ["lua"] | ||
57 | } | 64 | } |
58 | }, | 65 | }, |
59 | "diagnostic": { | 66 | "diagnostic": { |
diff --git a/nvim/.config/nvim/ftplugin/scheme.vim b/nvim/.config/nvim/ftplugin/scheme.vim index ac0ba6e..2b6c296 100644 --- a/nvim/.config/nvim/ftplugin/scheme.vim +++ b/nvim/.config/nvim/ftplugin/scheme.vim | |||
@@ -7,4 +7,3 @@ setlocal smarttab | |||
7 | setlocal formatoptions=croql | 7 | setlocal formatoptions=croql |
8 | 8 | ||
9 | CocDisable | 9 | CocDisable |
10 | let b:AutoPairs = {"(": ")", "[": "]", "{": "}", '"': '"' } | ||
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index d46bf88..d748fa6 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim | |||
@@ -4,9 +4,7 @@ let &t_ZM = "\e[3m" | |||
4 | call plug#begin('~/.local/share/nvim/plugged') | 4 | call plug#begin('~/.local/share/nvim/plugged') |
5 | 5 | ||
6 | Plug 'airblade/vim-gitgutter' | 6 | Plug 'airblade/vim-gitgutter' |
7 | Plug 'andymass/vim-matchup' | ||
8 | Plug 'godlygeek/tabular' | 7 | Plug 'godlygeek/tabular' |
9 | Plug 'jiangmiao/auto-pairs' | ||
10 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | 8 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } |
11 | Plug 'junegunn/fzf.vim' | 9 | Plug 'junegunn/fzf.vim' |
12 | Plug 'mattn/emmet-vim', {'for': ['javascript.jsx', 'html', 'css']} | 10 | Plug 'mattn/emmet-vim', {'for': ['javascript.jsx', 'html', 'css']} |
@@ -24,14 +22,11 @@ Plug 'tpope/vim-fugitive' | |||
24 | " syntax and friends | 22 | " syntax and friends |
25 | Plug 'rust-lang/rust.vim', {'for': 'rust'} | 23 | Plug 'rust-lang/rust.vim', {'for': 'rust'} |
26 | Plug 'lervag/vimtex', {'for': 'tex'} | 24 | Plug 'lervag/vimtex', {'for': 'tex'} |
27 | Plug 'neovimhaskell/haskell-vim', {'for': 'haskell'} | 25 | Plug 'neovimhaskell/haskell-vim', {'for': ['haskell', 'cabal']} |
28 | Plug 'elmcast/elm-vim' | 26 | Plug 'elmcast/elm-vim' |
29 | Plug 'LnL7/vim-nix' | 27 | Plug 'LnL7/vim-nix' |
30 | 28 | ||
31 | " colorschemes | 29 | Plug 'git@ferrn:vim/vim-colors-plain' |
32 | Plug 'nerdypepper/agila.vim' | ||
33 | Plug 'nerdypepper/chestnut.vim' | ||
34 | Plug 'nerdypepper/vim-colors-plain', { 'branch': 'duotone' } | ||
35 | 30 | ||
36 | call plug#end() | 31 | call plug#end() |
37 | 32 | ||
@@ -55,6 +50,20 @@ augroup restorecursor | |||
55 | \ endif | 50 | \ endif |
56 | augroup END | 51 | augroup END |
57 | 52 | ||
53 | augroup vimrc-incsearch-highlight | ||
54 | autocmd! | ||
55 | autocmd CmdlineEnter /,\? :set hlsearch | ||
56 | autocmd CmdlineLeave /,\? :set nohlsearch | ||
57 | augroup END | ||
58 | |||
59 | augroup fzfstatus | ||
60 | if has('nvim') && !exists('g:fzf_layout') | ||
61 | autocmd! FileType fzf | ||
62 | autocmd FileType fzf set laststatus=0 noshowmode noruler | ||
63 | \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler | ||
64 | endif | ||
65 | augroup END | ||
66 | |||
58 | " general settings | 67 | " general settings |
59 | set nobackup | 68 | set nobackup |
60 | set nowritebackup | 69 | set nowritebackup |
@@ -72,12 +81,11 @@ set laststatus=2 | |||
72 | set nowrap | 81 | set nowrap |
73 | set noshowmode | 82 | set noshowmode |
74 | set listchars=tab:┊\ ,nbsp:␣,trail:·,extends:>,precedes:< | 83 | set listchars=tab:┊\ ,nbsp:␣,trail:·,extends:>,precedes:< |
75 | set fillchars=vert:\│ | 84 | set fillchars=vert:\│,stl:\ ,stlnc:\ |
76 | set ignorecase | 85 | set ignorecase |
77 | set smartcase | 86 | set smartcase |
78 | set sidescroll=40 | 87 | set sidescroll=40 |
79 | set incsearch | 88 | set incsearch |
80 | set hlsearch | ||
81 | set undofile | 89 | set undofile |
82 | set undodir=~/tmp | 90 | set undodir=~/tmp |
83 | set path+=** | 91 | set path+=** |
@@ -89,7 +97,6 @@ set complete=.,w,b,i,u,t, | |||
89 | set background=dark | 97 | set background=dark |
90 | set mouse=a | 98 | set mouse=a |
91 | set conceallevel=0 | 99 | set conceallevel=0 |
92 | set nocursorline | ||
93 | set nonumber | 100 | set nonumber |
94 | set grepprg=rg\ --vimgrep\ --no-heading | 101 | set grepprg=rg\ --vimgrep\ --no-heading |
95 | set grepformat=%f:%l:%c:%m,%f:%l:%m | 102 | set grepformat=%f:%l:%c:%m,%f:%l:%m |
@@ -98,6 +105,7 @@ set shortmess+=c | |||
98 | set updatetime=300 | 105 | set updatetime=300 |
99 | set signcolumn=yes | 106 | set signcolumn=yes |
100 | set inccommand=split | 107 | set inccommand=split |
108 | set showmatch | ||
101 | 109 | ||
102 | let g:netrw_browsex_viewer= "xdg-open" | 110 | let g:netrw_browsex_viewer= "xdg-open" |
103 | 111 | ||
@@ -118,6 +126,7 @@ endfunction | |||
118 | :command! WQ wq | 126 | :command! WQ wq |
119 | :command! Wq wq | 127 | :command! Wq wq |
120 | :command! Wqa wqa | 128 | :command! Wqa wqa |
129 | :command! WQa wqa | ||
121 | :command! W w | 130 | :command! W w |
122 | :command! Q q | 131 | :command! Q q |
123 | 132 | ||
@@ -165,10 +174,8 @@ let g:fzf_colors = | |||
165 | \ 'marker': ['fg', 'Keyword'], | 174 | \ 'marker': ['fg', 'Keyword'], |
166 | \ 'spinner': ['fg', 'Label'], | 175 | \ 'spinner': ['fg', 'Label'], |
167 | \ 'header': ['fg', 'Comment'] } | 176 | \ 'header': ['fg', 'Comment'] } |
168 | 177 | let g:fzf_layout = { 'down': '40%' } | |
169 | " indentLine | 178 | let g:fzf_preview_window = [] |
170 | let g:indentLine_setColors = 0 | ||
171 | let g:indentLine_char = '┆' | ||
172 | 179 | ||
173 | let g:latex_view_general_viewer = 'zathura' | 180 | let g:latex_view_general_viewer = 'zathura' |
174 | let g:vimtex_view_method = "zathura" | 181 | let g:vimtex_view_method = "zathura" |
@@ -176,10 +183,6 @@ let g:vimtex_view_method = "zathura" | |||
176 | " man pages | 183 | " man pages |
177 | let g:ft_man_open_mode = 'tab' | 184 | let g:ft_man_open_mode = 'tab' |
178 | 185 | ||
179 | " vim-matchup | ||
180 | let g:matchup_matchparen_deferred = 1 | ||
181 | let g:matchup_matchparen_hi_surround_always = 1 | ||
182 | |||
183 | " coc-nvim | 186 | " coc-nvim |
184 | hi CocHintSign ctermfg=6 | 187 | hi CocHintSign ctermfg=6 |
185 | hi CocErrorSign ctermfg=1 | 188 | hi CocErrorSign ctermfg=1 |
diff --git a/nvim/.config/nvim/plugin/statusline.vim b/nvim/.config/nvim/plugin/statusline.vim index a25fb6d..3241fc2 100644 --- a/nvim/.config/nvim/plugin/statusline.vim +++ b/nvim/.config/nvim/plugin/statusline.vim | |||
@@ -25,17 +25,17 @@ let g:currentmode={ | |||
25 | 25 | ||
26 | hi PrimaryBlock ctermfg=00 ctermbg=6 | 26 | hi PrimaryBlock ctermfg=00 ctermbg=6 |
27 | hi SecondaryBlock ctermfg=07 ctermbg=10 | 27 | hi SecondaryBlock ctermfg=07 ctermbg=10 |
28 | hi Blanks ctermfg=11 ctermbg=0 | 28 | hi Blanks ctermfg=08 ctermbg=0 |
29 | 29 | ||
30 | hi User1 ctermfg=01 ctermbg=0 | 30 | hi User1 ctermfg=01 ctermbg=0 |
31 | hi User2 ctermfg=02 ctermbg=0 | 31 | hi User2 ctermfg=02 ctermbg=0 |
32 | hi User3 ctermfg=03 ctermbg=0 | 32 | hi User3 ctermfg=03 ctermbg=0 |
33 | hi User4 ctermfg=04 ctermbg=0 | 33 | hi User4 ctermfg=12 ctermbg=0 |
34 | hi User5 ctermfg=05 ctermbg=0 | 34 | hi User5 ctermfg=05 ctermbg=0 |
35 | hi User6 ctermfg=06 ctermbg=0 | 35 | hi User6 ctermfg=06 ctermbg=0 |
36 | hi User7 ctermfg=07 ctermbg=0 | 36 | hi User7 ctermfg=07 ctermbg=0 |
37 | hi User8 ctermfg=08 ctermbg=0 | 37 | hi User8 ctermfg=08 ctermbg=0 |
38 | hi User9 ctermfg=09 ctermbg=0 | 38 | hi User9 ctermfg=00 ctermbg=0 |
39 | 39 | ||
40 | highlight EndOfBuffer ctermfg=black ctermbg=black | 40 | highlight EndOfBuffer ctermfg=black ctermbg=black |
41 | 41 | ||
@@ -45,7 +45,7 @@ endfunction | |||
45 | 45 | ||
46 | function! StatuslineGit() | 46 | function! StatuslineGit() |
47 | let l:branchname = GitBranch() | 47 | let l:branchname = GitBranch() |
48 | return strlen(l:branchname) > 0?' '.l:branchname.' ':'' | 48 | return strlen(l:branchname) > 0?l:branchname.' ':'' |
49 | endfunction | 49 | endfunction |
50 | 50 | ||
51 | function! ReadOnly() abort | 51 | function! ReadOnly() abort |
@@ -68,11 +68,11 @@ function! Filepath() abort | |||
68 | \ '' : substitute(l:basename . '/', '\C^' . $HOME, '~', '') | 68 | \ '' : substitute(l:basename . '/', '\C^' . $HOME, '~', '') |
69 | 69 | ||
70 | if empty(l:prefix) && empty(l:filename) | 70 | if empty(l:prefix) && empty(l:filename) |
71 | return printf('%%8*%%f%%*%s %%m%%*', '%8*') | 71 | return printf('%%4*%%f%%*%s %%m%%*', '%4*') |
72 | elseif empty(l:prefix) | 72 | elseif empty(l:prefix) |
73 | return printf('%%8*%%f%%*%s %%m%%*', '%6*') | 73 | return printf('%%4*%%f%%*%s %%m%%*', '%6*') |
74 | else | 74 | else |
75 | return printf('%%8*%s%%*%s%s%%*', l:prefix, &modified ? '%6*' : '%8*', l:filename) | 75 | return printf('%%4*%s%%*%s%s%%*', l:prefix, &modified ? '%6*' : '%4*', l:filename) |
76 | endif | 76 | endif |
77 | endfunction | 77 | endfunction |
78 | 78 | ||
@@ -81,12 +81,12 @@ function! LinterStatus() abort | |||
81 | if empty(info) | return '' | endif | 81 | if empty(info) | return '' | endif |
82 | let msgs = [] | 82 | let msgs = [] |
83 | if get(info, 'error', 0) | 83 | if get(info, 'error', 0) |
84 | call add(msgs, printf('%%5*%s×%%*', info['error'])) | 84 | call add(msgs, printf('%%5*%s×%%* ', info['error'])) |
85 | endif | 85 | endif |
86 | if get(info, 'warning', 0) | 86 | if get(info, 'warning', 0) |
87 | call add(msgs, printf('%%3*%s!%%*', info['warning'])) | 87 | call add(msgs, printf('%%3*%s!%%* ', info['warning'])) |
88 | endif | 88 | endif |
89 | return join(msgs, ' ') | 89 | return join(msgs, '') |
90 | endfunction | 90 | endfunction |
91 | 91 | ||
92 | function! StatusLine(mode) abort | 92 | function! StatusLine(mode) abort |
@@ -100,6 +100,7 @@ function! StatusLine(mode) abort | |||
100 | 100 | ||
101 | " active | 101 | " active |
102 | if a:mode ==# 'active' | 102 | if a:mode ==# 'active' |
103 | let l:line.='%6*·%*' . ' ' | ||
103 | let l:line.='%7*%{StatuslineGit()}' | 104 | let l:line.='%7*%{StatuslineGit()}' |
104 | let l:line.='%<' | 105 | let l:line.='%<' |
105 | let l:line.=Filepath() | 106 | let l:line.=Filepath() |
@@ -108,15 +109,13 @@ function! StatusLine(mode) abort | |||
108 | let l:line.=' %{ReadOnly()} %w%*' | 109 | let l:line.=' %{ReadOnly()} %w%*' |
109 | let l:line.='%9* %=%*' | 110 | let l:line.='%9* %=%*' |
110 | 111 | ||
111 | let l:line.='%7* %l,%c %*' | 112 | let l:line.=' ' . '%7*%l,%c%*' . ' ' |
112 | let l:line.='%8* %{g:currentmode[mode()]}%*' | ||
113 | let l:line.=' ' | ||
114 | let l:line.=LinterStatus() | 113 | let l:line.=LinterStatus() |
115 | let l:line.=' ' | 114 | let l:line.='%4*'. &filetype |
116 | let l:line.='%8*'. &filetype | ||
117 | 115 | ||
118 | else | 116 | else |
119 | " inactive | 117 | " inactive |
118 | let l:line.='%5*·%*' . ' ' | ||
120 | let l:line.='%#Blanks#' | 119 | let l:line.='%#Blanks#' |
121 | let l:line.='%f %5*%m%*' | 120 | let l:line.='%f %5*%m%*' |
122 | let l:line.='%#Blanks# %=%*' | 121 | let l:line.='%#Blanks# %=%*' |
@@ -133,4 +132,3 @@ augroup MyStatusLine | |||
133 | autocmd WinEnter * setl statusline=%!StatusLine('active') | 132 | autocmd WinEnter * setl statusline=%!StatusLine('active') |
134 | autocmd WinLeave * setl statusline=%!StatusLine('inactive') | 133 | autocmd WinLeave * setl statusline=%!StatusLine('inactive') |
135 | augroup END | 134 | augroup END |
136 | |||