aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* replace the Guix channel installation with a mention of vis-plugFlorian Fischer2024-05-011-15/+1
| | | | | 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.
* use vis' event system instead of custom language server hooksFlorian Fischer2024-04-304-14/+16
|
* lspc, init: emit LS_INITIALIZED and implicitly call lspc_open on server initgit-bruh2024-04-302-0/+28
|
* mention the new event hooks in the READMEFlorian Fischer2024-04-301-1/+3
|
* include the language server name in log messagesFlorian Fischer2024-04-301-2/+2
|
* call the new hooksFlorian Fischer2024-04-301-0/+9
| | | | | | | | | | 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.
* move some of the ls_* methods in the language server's tableFlorian Fischer2024-04-301-43/+59
| | | | | | | | 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, ...).
* support navigating in the merged diagnostics of multiple serversFlorian Fischer2024-04-301-24/+39
|
* add functions to compare LSP ranges and positionsFlorian Fischer2024-04-301-0/+10
|
* support showing diagnostics from multiple language serversFlorian Fischer2024-04-301-23/+32
|
* use a global mapping of open filesFlorian Fischer2024-04-302-17/+30
| | | | | | | 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.
* support highlighting line numbers using vis:style_posFlorian Fischer2024-04-252-26/+54
| | | | | Replace the hacky style_lineno code with the new vis:style_pos API probably included in upcoming vis v0.9.
* Merge branch 'show-message' into 'main'Florian Fischer2024-04-153-18/+49
|\ | | | | | | | | make the way messages are presented configurable See merge request muhq/vis-lspc!49
| * make the way messages are presented configurableFlorian Fischer2024-04-153-28/+41
| | | | | | | | | | | | | | | | | | 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.
| * init: show messages not requiring context in a new splitgit-bruh2024-04-121-7/+14
| |
| * _show_markdown_message: helper for markdown infogit-bruh2024-04-122-9/+20
|/
* disable reformatting the languageId mapFlorian Fischer2024-04-121-0/+2
|
* init: map javascript/typescript to jsx/tsxgit-bruh2024-04-121-4/+7
|
* enable diagnostic highlighting by defaultFlorian Fischer2024-04-111-1/+1
| | | | | This is inline with our README.md claiming 'line' is the default value for highlight_diagnostics.
* use less instructive default styles for highlighting diagnosticFlorian Fischer2024-04-111-4/+4
|
* init: make formatFlorian Fischer2024-04-111-4/+4
|
* fix presentation of the diagnostic stylesFlorian Fischer2024-04-111-9/+1
|
* chnage default diagnostic styles and mention them in the READMEFlorian Fischer2024-04-112-5/+13
|
* lspc, init: add different diagnostic styles for each typegit-bruh2024-04-112-5/+34
|
* Merge branch 'apply-workspaceEdit-remember-cursor' into 'main'Florian Fischer2024-04-083-1/+13
|\ | | | | | | | | restore the primary cursor position after a workspaceEdit See merge request muhq/vis-lspc!47
| * restore the primary cursor position after a workspaceEditapply-workspaceEdit-remember-cursorFlorian Fischer2024-03-223-1/+13
| |
* | lspc: explicitly specify publishDiagnostics in client_capabilitiesgit-bruh2024-04-081-0/+1
| |
* | init: make lspc-message-level configurablegit-bruh2024-04-071-0/+5
| |
* | supported-servers.lua: add goplsgit-bruh2024-04-071-0/+4
|/
* Merge branch 'fix-doc-history' into 'main'Florian Fischer2023-11-211-4/+4
|\ | | | | | | | | Fix lscp.open_file not actually adding to history See merge request muhq/vis-lspc!45
| * Fix lscp.open_file not actually adding to historyMichiel van den Heuvel2023-11-211-4/+4
|/
* increase thedefault style idFlorian Fischer2023-10-251-1/+1
| | | | | | | | | 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.
* fix wandering empty diagnostic highlightsFlorian Fischer2023-10-121-6/+9
| | | | | | | | | | | | | | | | 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
* fix diagnostic highlighting and messageThim Cederlund2023-10-121-2/+13
| | | | | | | | | | | | | | 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.
* allow to specify the syntax to use for the diagnostics commandsFlorian Fischer2023-10-121-10/+10
|
* report if no diagnostics are availableFlorian Fischer2023-10-121-1/+1
| | | | | Since the diagnostics table is created when we open the file it will always be ~= nil.
* store diagnostics received for files not in the current windowFlorian Fischer2023-10-121-2/+4
|
* improve language in the READMEFlorian Fischer2023-10-071-34/+34
| | | | | | | * fix typos * wrap file or project names in code blocks * drop the hint taht vis-lspc is in an early state * s/json/JSON/
* implement cycling between available diagnosticsFlorian Fischer2023-10-072-0/+72
| | | | | | This is implemented by the two new commands: * lspc-next-diagnostics - jump to the next available diagnostic * lspc-prev-diagnostics - jump to the previous available diagnostic
* fix diagnostics line highlightingFlorian Fischer2023-10-061-4/+3
| | | | | | | | Range highlighting used the vis_range and line highlighting the LSP range. Do not touch old code you no longer understand because you think you are apparently smarter than your past self! Fixes: efd5262f2c45d3289e482b1091d3c1d44cf67a42
* Merge branch 'vis-next' into 'main'Florian Fischer2023-10-062-6/+7
|\ | | | | | | | | | | | | use new vis 0.9 features Closes #43 See merge request muhq/vis-lspc!42
| * remove default formatting options for luaFlorian Fischer2023-10-061-1/+0
| | | | | | | | | | | | Default formatting options should not be configured by the LSPC client, the user should either configure them explicitly or use something like editorconfig or mode lines.
| * use vis default formatting optionsFlorian Fischer2023-10-061-2/+4
| | | | | | | | Since vis 0.9 the options are exposed via the vis.options table.
| * adapt communicate API released with vis 0.9Florian Fischer2023-10-061-3/+3
|/
* mention the legacy support branchFlorian Fischer2023-10-061-1/+3
|
* support highlighting the line number of available diagnosticsv0.2.0Florian Fischer2023-10-062-7/+33
|
* Merge branch 'naive_documentChanges_support' into 'main'Florian Fischer2023-08-291-1/+12
|\ | | | | | | | | | | | | try to convert workspaceEdit.documentChanges to plain changes Closes #34 See merge request muhq/vis-lspc!44
| * try to convert workspaceEdit.documentChanges to plain changesFlorian Fischer2023-08-291-1/+12
|/ | | | | | | 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[].
* do not index a nil value when no formatting edits are returnedFlorian Fischer2023-08-291-1/+4
| | | | | | | | | | | 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
* fix hover result determinationFlorian Fischer2023-08-291-1/+1
| | | | | If the result is MarkedString[] the table must have a length > 0, because all returned object types are represented as lua tables.