aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/.config/nvim/lua/lsp/init.lua61
-rw-r--r--vim/.config/nvim/spell/en.utf-8.add33
-rw-r--r--vim/.config/nvim/spell/en.utf-8.add.splbin2919 -> 3257 bytes
-rw-r--r--vim/.vim/after/ftplugin/tex.vim18
-rw-r--r--vim/.vimrc3
5 files changed, 43 insertions, 72 deletions
diff --git a/vim/.config/nvim/lua/lsp/init.lua b/vim/.config/nvim/lua/lsp/init.lua
index 474f649..1739cee 100644
--- a/vim/.config/nvim/lua/lsp/init.lua
+++ b/vim/.config/nvim/lua/lsp/init.lua
@@ -1,64 +1,3 @@
-local first_hover_code_i = 0
-local first_hover_code_line = -1
-local first_hover_code_col = -1
-local first_hover_code_prev = ''
-
--- Returns the first code block from the markdown returned for the LSP request
--- textDocument/hover. Multiple lines are joined with a space.
-function _G.lsp_first_hover_code()
- --[[ NB: there is a bug that causes statusline to be reloaded continuously;
- see https://github.com/neovim/neovim/issues/14303. It is not good to do a
- sync request every time. Instead, keep track of line & col and only
- update when either has changed. This should be fixed in nvim 0.5, after
- which the first_hover_code_* variables and this logic can be removed. ]]
-
- local line, col = unpack(vim.api.nvim_win_get_cursor(0))
- if line == first_hover_code_line and col == first_hover_code_col then
- return first_hover_code_prev
- end
- first_hover_code_line = line
- first_hover_code_col = col
-
- --[[ To check whether the bug has been fixed:
- vim.api.nvim_echo({{'request '},{tostring(first_hover_code_i)},{tostring(line)}},false,{})
- first_hover_code_i = first_hover_code_i + 1
- --]]
-
- if not vim.lsp.buf.server_ready() then return '' end
-
- local responses = vim.lsp.buf_request_sync(
- 0,
- 'textDocument/hover',
- vim.lsp.util.make_position_params(),
- 1000
- )
-
- if not responses then return '' end
-
- local full_result = ''
- local markdown_started = false
-
- for _, response in ipairs(responses) do
- if response.result and response.result.contents.value then
- for line in response.result.contents.value:gmatch '[^\n]+' do
- if line:sub(0,3) == '```' then
- if markdown_started then
- first_hover_code_prev = full_result
- return full_result
- else
- markdown_started = true
- end
- else
- full_result = full_result .. ' ' .. line
- end
- end
- end
- end
-
- first_hover_code_prev = full_result
- return full_result
-end
-
local function on_attach (client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
diff --git a/vim/.config/nvim/spell/en.utf-8.add b/vim/.config/nvim/spell/en.utf-8.add
index 66d373b..787cb15 100644
--- a/vim/.config/nvim/spell/en.utf-8.add
+++ b/vim/.config/nvim/spell/en.utf-8.add
@@ -259,3 +259,36 @@ subordinator
agnostically
creolization
overgeneration
+frequentative
+countability
+subtractive
+atomicity
+articulatory
+unconsiously/!
+Rhotic
+Diachrony
+diachrony
+morphosyntactically
+complementarily
+connectedness
+allomorphs
+complementariness
+semelfactive
+morphosyntax
+rhotics
+rhotic
+phonestheme
+markedness
+augmentatives
+affricates
+subevents
+phonaestheme
+Phonaesthemes
+phonaesthemes
+ideophones
+phonaesthemic
+boundedness
+affricate
+eventive
+selectional
+a priori
diff --git a/vim/.config/nvim/spell/en.utf-8.add.spl b/vim/.config/nvim/spell/en.utf-8.add.spl
index 679e71c..67b98b1 100644
--- a/vim/.config/nvim/spell/en.utf-8.add.spl
+++ b/vim/.config/nvim/spell/en.utf-8.add.spl
Binary files differ
diff --git a/vim/.vim/after/ftplugin/tex.vim b/vim/.vim/after/ftplugin/tex.vim
index 23b1a40..66be81d 100644
--- a/vim/.vim/after/ftplugin/tex.vim
+++ b/vim/.vim/after/ftplugin/tex.vim
@@ -8,13 +8,15 @@ function! SyncTeXToPDF()
\ shellescape(g:synctex_zathura_pdf_filename))
endfunction
-function! g:SyncPDFToTeX(input, line)
- " Focus the window vim is running in.
- exe "silent !i3-msg '[id=\"" . environ()['WINDOWID'] . "\"] focus'"
- " Open the file name and jump to the right line.
- " Mysteriously, we need `cd .` to fix the file name in the tabline.
- " Putting this in one `exe` seems to reduce flickering.
- exe 'tab drop ' . a:input . ' | silent ' . a:line . ' | silent cd .'
-endfunction
+if !exists("*g:SyncPDFToTeX")
+ function! g:SyncPDFToTeX(input, line)
+ " Focus the window vim is running in.
+ exe "silent !i3-msg '[id=\"" . environ()['WINDOWID'] . "\"] focus'"
+ " Open the file name and jump to the right line.
+ " Mysteriously, we need `cd .` to fix the file name in the tabline.
+ " Putting this in one `exe` seems to reduce flickering.
+ exe 'tab drop ' . a:input . ' | silent ' . a:line . ' | silent cd .'
+ endfunction
+endif
map <C-T> :call SyncTeXToPDF()<CR>
diff --git a/vim/.vimrc b/vim/.vimrc
index e41e2c3..8f1082a 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -188,9 +188,6 @@ let g:VM_case_setting = 'sensitive'
" Don't let match-up mess up the statusline
let g:matchup_matchparen_status_offscreen=0
-" Status line based on LSP
-set statusline+=%{luaeval('lsp_first_hover_code()')}
-
" Clean has no language server, we use the cloogletags statusline component
set statusline+=%{cleanvim#tags#statusline()}%<