| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Since vis 0.9 the options are exposed via the vis.options table.
|
| | |
|
| |
|
|
|
|
|
| |
We do not support workspaceEdit.documentChanges but some LSP servers
do not respect our capabilities and send them anyways.
Try to optimistically convert simple documentChanges to plain changes.
We only support simple TextDocumentEdit[].
|
| |
|
|
|
|
|
|
|
|
|
| |
The method textDocument/formatting is allowed to return null/nil which
was directly passed to vis_apply_textEdits causing an exception
when trying to iterate the textEdits table.
Only pass the result of textDocument/formatting to vis_apply_textEdits
if there is an actual result.
Fixes: e83950a7149f364b653395cdd4d9446875a7f469
|
| |
|
|
|
| |
If the result is MarkedString[] the table must have a length > 0,
because all returned object types are represented as lua tables.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This should be wired up to code that's in a pull request in the vis
repository for the default options. This PR does not yet expose
`expandtab`.
Referenced PR: https://github.com/martanne/vis/pull/717
|
| |
|
|
|
|
|
| |
This is tested with the Rust language server and the Lua one. Moving
the cursor to the correct position afterwards works with Rust, but not
with Lua. Being smarter about the ranges is probably necessary for Lua
and might make other ones more robust.
|
| | |
|
| | |
|
| |
|
|
|
| |
When using vis_open_doc_pos, don't reopen the file if the path of the
opened file and the doc_pos match.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Currently if a method call result causing the editor to jump to a new
location is received from the language server we change the current
window ('vis.win').
However this behavior is strange if the user has already switch window
the message window was opened.
Remember the window where the jump was requested and execute it in
the original window.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We can not only use the fact that we have a method call inflight with
the observed id. Because the language server may has called a method
on use with the same id.
Therefore we have to also check if the incoming message contains
a method field.
method + id -> method call
id -> method response
method -> notification
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Send language server settings after initialization via a
workspace/didChangeConfiguration notification.
Implement a workspace/configuration handler using the values stored
in the language server settings.
Send the init_options as initializationOptions in the initialize
parameters.
|
| | |
|
| |
|
|
| |
Fixes !41.
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
vis uses vis:pipe to call vis-menu when completing filenames.
Simply copy what vis does. However, using vis:pipe does not work with
fzf. I do not understand why but the vis-menu special case seams to work.
|
| |/
|
|
|
| |
Fix the off-by-one manual range conversion by using the already available
helper function.
|
| |
|
|
|
|
|
| |
Apparently the version from the AUR behaves differently from
the version installed via luarocks.
Now the 100 chars column limit is actually applied.
|
| |
|
|
|
| |
This helps to move code out of the to big init.lua as well as
allows to use the vis-lspc version in different lua files.
|
| |
|
|
| |
Fixes: 9c0a9b4fdcb2f0912b8ec3b9f7127d660565f898
|
| |
|
|
|
|
|
|
|
|
|
|
| |
LSP defines the parameters of the initialized notifications as empty
object.
The dart language server expects that the initialize notification has an
empty params object.
Therefore, pass an empty parameter table to the initialized notification.
Tested with our fallback json implementation as well as dkjson.
Fixes !37.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The ServerCapability textDocumentSync is optional and may be of kind
TextDocumentSyncOptions | TextDocumentSyncKind;
If a server uses TextDocumentSyncKind which is a integer enum
our .save check fails.
Test if it is save to use textDocumentSync as table before checking the
save capability.
Fixes !35.
|
| | |
|
| | |
|
| |
|
|
|
| |
Correct the name of two parameters and ensure that the required
parameter 'rootUri' is always set to null.
|
| | |
|
| |
|
|
|
|
|
| |
Introduce a new configuration message_level to control the messages
displayed.
The option message_level ranges from 1 - 4 (Error - Log) and corresponds
to LSP's MessageType namespace.
|
| | |
|
| |
|
|
|
|
|
| |
Be nicer to the language servers by providing our capabilities so
maybe we get more deterministic results.
We do not support dynamicRegistration, markdown or workDoneProgress.
|
| |
|
|
|
|
| |
python-language-server sends a list of MarkedStrings containing
the signature as python code-block and the doc string as string.
https://github.com/palantir/python-language-server/issues/836
|
| | |
|
| | |
|
| |
|
|
|
| |
We try 'json', 'cjson' and 'dkjson' in that order before using our
bundled fallback implementation.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I use to have logging enabled to be able to debug weird vis-lspc
behavior right away. But I got annoyed by vis-lspc cluttering all my
directories with vis-lspc.log files.
So vis-lspc will no write its log files to
$XDG_DATA_HOME/vis-lspc/<iso-date>-<cwd-basename>.log if
lspc.log_file is not set by the user.
This patch also introduces a helper to run a program and capture
its output.
|
| | |
|
| |
|
|
| |
Don't use a global variable.
|
| | |
|