| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
| |
Fixes: 87881778dfa808f41b5ee911095318373fae9a72
|
| | |
|
| |
|
|
|
|
|
| |
Use %s and '' instead of "" to prevent the shell from interpreting the string
to print.
Escape all occurenses of ' in the string with '"'"' like python's shlex.quote.
This prevents shell injection attacks by files with malicious names.
|
| | |
|
| |
|
|
|
|
|
| |
Fallback to the first usable language server if neither a syntax is
explicitly specified nor a syntax is set in the window.
Support an explicit syntax argument in all registered commands.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Properly remove the reference to the language server to which we
send the didClose notification.
Additionally, remove the open file reference if this was the last
language server for the closed file.
Fixes: 3c4b876ce21be2928c1bab33856d2294e6b43f5b
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Introduce a new helper to determine if a file is opened in a specific
language server.
Cleanup SAVE and CLOSE events.
They get registered for each associated language server during lspc_open,
therefore one individual event only needs to take care of its specific
language server not all.
Remove the unused open_file table from language severs.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
lua52 does not support the // arithemtic operator.
Reported-By: avery havaniceday <shitpostalotl@unix.dog>
|
| |
|
|
|
| |
Since the line number styling is merged into vis and supported by
vis-lspc the Guix channel with a patched vis is not needed anymore.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The two new hooks allow to execute user code after certain events.
They are called with the language server table as first argument.
* initialized_hook is called after the initialized notification
was sent.
* file_open_hook is called after sending a textDocument/didOpen
notification.
|
| |
|
|
|
|
|
|
| |
Including methods in the language server table allows them to be used
outside of vis-lspc.
Additionally, I think this makes more sense to use them as methods
with the ls:method(...) syntax instead of calling them as ls_method(ls, ...).
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This allows us to support opening a single file in multiple
language server instances.
This can be useful when combining for example a latex and a language
tool language server.
|
| |
|
|
|
| |
Replace the hacky style_lineno code with the new vis:style_pos
API probably included in upcoming vis v0.9.
|
| |\
| |
| |
| |
| | |
make the way messages are presented configurable
See merge request muhq/vis-lspc!49
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The two options are either using vis:message (the default) which will
keep all messages in the vis message buffer and include a header line to
distinguish the different messages.
The second option is using open and presenting messages in a separate
window supporting syntax highlighting.
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is inline with our README.md claiming 'line' is the default
value for highlight_diagnostics.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
restore the primary cursor position after a workspaceEdit
See merge request muhq/vis-lspc!47
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| | |
Fix lscp.open_file not actually adding to history
See merge request muhq/vis-lspc!45
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
Using the new latex lexer from the upcoming vis release I noticed
that vis-lspc default style id 43 overrides the environment style
from the lexer.
To prevent id clashing use the highest allowed id for lexer styles,
which is 64 according to the enum defined in vis/ui.h.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last commit introduces support for highlighting empty selections
by properly calculating their vis ranges.
However File:content does return an empty string for empty ranges
and we can not check whether the diagnostic still applies to the same
position.
This is fixed by faking a one character range when receiving an
empty one.
Doing so we get a valid one-character content we can compare and
still have proper highlighting because we unconditionally decrement
the range end in highlight_diagnostics.
Fixes: 7099e56062861fc8dbb143e78447cce6bf886a97
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some language servers report diagnostics with empty ranges, start and
end are at the same line and character, which currently results in
no highlighting at all.
Since the end of a LSP range is exclusive we always subtract 1 from
it which results in invalid ranges when the server has sent an empty one.
Introduce a check to fix this special case.
`textDocument/publishDiagnostics` doesn't always have a `code` field,
resulting in `diagnostic.code` being nil and so it is replaced with
`diagnostic` in those cases.
|
| | |
|
| |
|
|
|
| |
Since the diagnostics table is created when we open the file
it will always be ~= nil.
|