The previous jump method (using G) set a jump, but cursor() doesn't, so
we manually update the jumplist before moving the cursor so as to not
take away previously existing functionality (the ability to use <C-O> to
undo a jump)
On tab-indented lines, (or any line where column number and virtual
column number are different) `|` puts the cursor on the nth virtual
column, not the nth character of the line. This caused the
Lsp{Next,Previous}Reference commands to place the cursor on the wrong
column on tab-indented lines.
* Highlight references to the symbol under cursor
Use the `textDocument/documentHighlight` method to retrieve references
to the symbol under the cursor, and highlight them with matchaddpos().
Add the commands `LscPreviusReference` and `LscNextReference` to
navigate between references within the buffer.
Adaption from the implementation of "Highlight references" in vim-lsc:
https://github.com/natebosch/vim-lsc/blob/5b587b0c/autoload/lsc/cursor.vim
* Fixups
+ Lapsus: `while` statement where it should be `if`.
+ Fix alignment in docs.
* Update LICENSE-THIRD-PARTY
Moving the error navigation code out of signs.vim to diagnostics.vim
means that errors can be navigated when signs are disabled.
This commit re-introduces error-column navigation, after the signs
refactoring.
This commit adds the error column to the array of errors (previously an
array of line numbers, now an array of [line,column] pairs). This allows
navigation directly to the error position, but also nvaigating to
multiple errors in a single line.
* Save/restore cursor position
* Cosmetic change
* selection should be inclusive
Because exclusive doesn't select fisrt character with 1GvG0
* Remove last extra \n
* Be graceful
* Use winsaveview/winrestoreview
* WIP code actions
It was addded the code actions funcionality
https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction
Processing the result is not quite right, because it is always applying
the c (change) command, and it does not insert the new line (\n)
character
* WIP code actions
It was addded the code actions funcionality
https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction
Processing the result is not quite right, because it is always applying
the c (change) command, and it does not insert the new line (\n)
character
* Improved apply_text_edit
Now the function apply_text_edit insert texts as well, instead of only
replacing it.
Fixed some typos and broken links
* Added documentation and fixed code_action
Now lsp#ui#vim#code_action uses the diagnostic range instead of the
get_position
* Fixed code action
The code action had a problem when it needed to delete/replace some
text, and when the code was folded it did not work since to execute do
not seem to unfold the code
* Changed copy to deepcopy
Since we modifying nested objects we need to use deepcopy
* Fixed preprocessing and added sort to textedits
To perform an unfold it is necessary to check first if the line has
fold level, if the line has foldlevel = 0 and you try to unfold it will
cause and error.
Since LSP specification does not guarantee that text edits are ordered,
we needed to sort it so it will work on any valid LSP
* Fixed text edits sort
Removed stable_sort since it is not necessary
Now it sorts the text edits in a reverse order and merge text edits
that are inserts on the same place
* Fixed codeAction deleting lines
* Passing capability on initialization
* Added buffer validation before setting the sign
This validation is necessary since the documentation states that the
file {fname} must be already be loaded in a buffer.
* Changed msgpack_type to v:true
Msgpack_type does not work on vim
Currently calling hover on a filetype without support throws an error, stating
that 'Unknown function: <SNR>274_not_supported'. This adds the `not_supported`
function into the scripts' scope.
* add variables to define custom signs
* set signs via exec
* use dict for custom signs
* support all sign params
* update readme with a note about custom signs
* add lsp highlighting groups, remove options to set texthl and linehl via dict.