andcake / micro-plugin-lsp Goto Github PK
View Code? Open in Web Editor NEWAn LSP Client implementation for the Micro Editor
License: MIT License
An LSP Client implementation for the Micro Editor
License: MIT License
This is really disturbing that a language server plugin changes the file while saving.
It shouldn't do that by default at least, since it might go unnoticed (like when auto saving on quit).
This breaks many repository that have different coding convention since formatting is per project dependent.
For rust-analyzer, I wanted to pass the initialization options {"checkOnSave":{"command":"check"}}
, but the plugin parsed that as {"checkOnSave":{"command":"check"}
. Currently the plugin uses a regex to split the option string, and I don't see any way to split the string using a regex and allowing for nested json. We could start counting brackets, but I feel like the real solution to this problem is to split the lsp.server
setting into separate settings for each language.
I think that we can already do this to a certain extent right now without even changing the plugin, i.e.
{
"ft:rust": {
"lsp.server": "rust=rust-analyzer"
}
...
}
but we would still have to fix the above mentioned bug. IMO we should overhaul the settings format while we're at it, so that people can specify settings like this:
{
"ft:rust": {
"lsp.server": "rust-analyzer",
"lsp.initOptions": {
"checkOnSave": {
"command": "check"
}
}
}
}
Or we could have lsp.initOptions
be a string, if micro doesn't allow for object valued options. This would be backwards incompatible, but I feel like this is a change worth making at some point, because having one long option is kinda a nightmare. We could also do this in a backwards compatible way by branching on whether there's an =
in lsp.server
. Anyway, what are people's thoughts on this?
This might be a lost case, but...
When using 'alt-d' on a wikilink in a markdown file, after setting 'zk lsp' as the LSP in the config, it works beautifully for one-word jumps, but fails if there are spaces in the filename. Example:
It works:
[[tpnote]] (this is an existing file, it opens it)
It fails:
[[Just use unix]] (this is an existing file, it opens a blank file instead)
Is there any way to fix this? (other than sluggifying all filenames).
Thanks!
Thanks for the great plugin. I've been successfully using it with F# (fsautocomplete) with a few mods in my fork. However, I had little success with csharp-ls. It seems the server tries to register a dynamic capability which I do not think it is supported here. The LSP spec highlights we can prevent the server from trying register it but I am not sure how to modify the plugin code to set this up. Any ideas?
Micro debug log:
2024/05/12 11:29:24 Micro started
2024/05/12 11:29:24 ONBUFFEROPEN unknown
2024/05/12 11:29:24 ONBUFFEROPEN unknown
2024/05/12 11:29:24 ONBUFFEROPEN csharp
2024/05/12 11:29:24 Server Options map[1:csharp=csharp-ls 2:fsharp=fsautocomplete --adaptive-lsp-server-enabled --project-graph-enabled={"fsiExtraParameters":["--compilertool:/home/queil/.fsharp/fsx-extensions/.fsch"]} 3:python=pylsp 4:go=gopls 5:typescript=deno lsp 6:javascript=deno lsp 7:markdown=deno lsp 8:json=deno lsp 9:jsonc=deno lsp 10:rust=rust-analyzer 11:lua=lua-language-server 12:c++=clangd 13:dart=dart language-server]
2024/05/12 11:29:24 Starting server csharp
2024/05/12 11:29:24 csharp>>> initialize
2024/05/12 11:29:24 ONSTDERR [11:29:24.663 INF] [Initialization] initializing, csharp-ls version 0.13.0.0
2024/05/12 11:29:24 csharp <<< window/showMessage
2024/05/12 11:29:24 DATA map[jsonrpc:2.0 method:window/showMessage params:map[message:csharp-ls: initializing, version 0.13.0.0 type:3]]
... TRUNCATED MANY LINES LIKE THE ABOVE ...
2024/05/12 11:29:24 DATA map[jsonrpc:2.0 method:window/showMessage params:map[message:csharp-ls: initializing, version 0.13.0.0 type:3]]
2024/05/12 11:29:24 Parsing failed Content-Length: 121
{"jsonrpc":"2.0","method":"window/showMessage","params":{"type":3,"message":"csharp-ls: initializing, version 0.13.0.0"}}
2024/05/12 11:29:24 ONSTDERR [11:29:24.702 INF] [Initialization] csharp-ls is released under MIT license and is not affiliated with Microsoft Corp.; see https://github.com/razzmatazz/csharp-language-server
2024/05/12 11:29:24 csharp <<< window/showMessage
2024/05/12 11:29:24 DATA map[jsonrpc:2.0 method:window/showMessage params:map[message:csharp-ls: csharp-ls is released under MIT license and is not affiliated with Microsoft Corp.; see https://github.com/razzmatazz/csharp-language-server type:3]]
2024/05/12 11:29:24 ONSTDERR [11:29:24.712 INF] [Initialization] MSBuildLocator: will register ".NET Core SDK", Version=8.0.104 as default instance
2024/05/12 11:29:24 csharp <<< no method
2024/05/12 11:29:24 DATA map[id:0 jsonrpc:2.0 result:map[capabilities:map[callHierarchyProvider:true codeActionProvider:map[resolveProvider:true] codeLensProvider:map[resolveProvider:true] completionProvider:map[triggerCharacters:map[1:. 2:']] definitionProvider:true documentFormattingProvider:true documentHighlightProvider:true documentOnTypeFormattingProvider:map[firstTriggerCharacter:; moreTriggerCharacter:map[1:} 2:)]] documentRangeFormattingProvider:true documentSymbolProvider:true hoverProvider:true implementationProvider:true inlayHintProvider:map[resolveProvider:false] referencesProvider:true renameProvider:true semanticTokensProvider:map[full:true legend:map[tokenModifiers:map[1:static] tokenTypes:map[1:class 2:comment 3:property 4:enumMember 5:enum 6:event 7:method 8:variable 9:interface 10:keyword 11:namespace 12:number 13:operator 14:parameter 15:struct 16:regex 17:string 18:typeParameter]] range:true] signatureHelpProvider:map[triggerCharacters:map[1:( 2:, 3:< 4:{ 5:[]] textDocumentSync:map[change:2 openClose:true save:map[includeText:true]] typeDefinitionProvider:true typeHierarchyProvider:true workspaceSymbolProvider:true]]]
2024/05/12 11:29:24 Received message for csharp initialize : map[id:0 jsonrpc:2.0 result:map[capabilities:map[callHierarchyProvider:true codeActionProvider:map[resolveProvider:true] codeLensProvider:map[resolveProvider:true] completionProvider:map[triggerCharacters:map[1:. 2:']] definitionProvider:true documentFormattingProvider:true documentHighlightProvider:true documentOnTypeFormattingProvider:map[firstTriggerCharacter:; moreTriggerCharacter:map[1:} 2:)]] documentRangeFormattingProvider:true documentSymbolProvider:true hoverProvider:true implementationProvider:true inlayHintProvider:map[resolveProvider:false] referencesProvider:true renameProvider:true semanticTokensProvider:map[full:true legend:map[tokenModifiers:map[1:static] tokenTypes:map[1:class 2:comment 3:property 4:enumMember 5:enum 6:event 7:method 8:variable 9:interface 10:keyword 11:namespace 12:number 13:operator 14:parameter 15:struct 16:regex 17:string 18:typeParameter]] range:true] signatureHelpProvider:map[triggerCharacters:map[1:( 2:, 3:< 4:{ 5:[]] textDocumentSync:map[change:2 openClose:true save:map[includeText:true]] typeDefinitionProvider:true typeHierarchyProvider:true workspaceSymbolProvider:true]]]
2024/05/12 11:29:24 csharp>>> initialized
2024/05/12 11:29:24 Found running lsp server for csharp firing textDocument/didOpen...
2024/05/12 11:29:24 csharp>>> textDocument/didOpen
2024/05/12 11:29:24 ONSTDERR [11:29:24.775 VRB] [Initialization] handleInitialized: "initialized" notification received from client
2024/05/12 11:29:24 csharp <<< client/registerCapability
2024/05/12 11:29:24 DATA map[id:2 jsonrpc:2.0 method:client/registerCapability params:map[registrations:map[1:map[id:f6a442a6-1f98-4126-a64e-c0947bda6d5f method:textDocument/prepareTypeHierarchy registerOptions:map[documentSelector:map[1:map[pattern:**/*.cs scheme:file]]]]]]]
2024/05/12 11:29:24 Unhandled message 1 csharp Content-Length: 260
{"jsonrpc":"2.0","id":2,"method":"client/registerCapability","params":{"registrations":[{"id":"f6a442a6-1f98-4126-a64e-c0947bda6d5f","method":"textDocument/prepareTypeHierarchy","registerOptions":{"documentSelector":[{"scheme":"file","pattern":"**/*.cs"}]}}]}}
Hi I would like to use the plugin to program in Java and make my life easier except that I don't see Java in the programming languages to test, do you know if I can use it with Java if so how?
I wanted to try reinstalling from scratch, but even after
~/.config/micro/settings.json
to an empty json~/.config/micro/plug/lsp
python-lsp-server
and pylsp-mypy
I'm still getting code checks. Could I ask how to properly uninstall this plugin? Or if maybe I'm forgetting something important here?
Hello!
Ctrol-Cpace does not work for completion on Macos Iterm2,
Note:
I set Preferences->Profiles->Keys->Presets
and Esc+
Thanks.
HI, thanks for this amazing project
I tried following the instructions on the readme and opened a Python file.
message on status bar:
could not find `Cargo.toml` in `path` or any parent directory
It also asked me to add rls
to my rustup toolchain, so looks like this is not considering the filetype.
Thanks for this excellent plugin. Life changer.
I'd like to point out that adding support for PHP with intelephense (the standard LSP for PHP) was really easy.
All it needs is to be declared and use --stdio
parameter.
e.g. my settings:
"lsp.server": "c=clangd,php=intelephense --stdio,python=...
and of course intelephense needs to be installed. You might want to add it as a documentation that PHP can be supported!
HTH.
I am currently attempting to use the typescript-language-server LSP (https://github.com/typescript-language-server/typescript-language-server) with this plugin, which requres the flags --stdio
in order to run, however after following the guide set out on the readme of this repo I can not seem to get it to work.
The relevant line in my configuration looks like:
and the error I receive is:
Everything par this is the default config set on install. If this is an error by me, perhaps the readme could be clarified in order to make it clearer how one should do commandline args?
Thanks.
Hey there! Super excited for this project, I've been looking forward to micro getting LSP support.
Anyways, I was testing the plugin with JavaScript, and I noticed that every time I start typing and there's a warning, it looks like micro re-draws and it's been bugging me. Here's a gif of it happening: https://ibb.co/h770MqB
Is this intended behavior? If so, is there a way to disable it?
Thanks in advance,
ferretcode
this plugin looks SOOOOO GREAT but sadly when I'm trying to use dart it doesn't work at all
"lsp.autocompleteDetails": true,
"lsp.formatOnSave": false,
"lsp.ignoreMessages": "LS message1 to ignore|LS message 2 to ignore|...",
"lsp.ignoreTriggerCharacters": "completion,signature",
"lsp.server": "dart=dart language-server, c++=clangd",
"lsp.tabcompletion": true,
this is my config but it doesn't work at all
thanks in advance!!! =)
Tab completes unambiguous part. Double tab lists possible completions.
Tab completion can be both faster and more helpful when done similar to Jupyter iPython, Bash, and many other popular Linux shells.
There are two main uses for auto completion
Completion can be faster when Tab works Linux/Bash/iPython style. A simple UI for additional information can be shown when needed.
When user presses Tab, complete current word as far as possible. User chooses completion by typing the next character.
Alternatively, user can press tab twice more (in the middle of completion) to see possible options. Alternatives could be shown on the half screen buffer.
For example, consider a case with possible completions:
foo.SystemReadWriteFactory
foo.SystemReadWriteHandle
foo.WipeHelper
foo.bar
foo.foo
User types
foo.S[Tab]
System autocompletes
foo.SystemReadWrite
User types additional "F". System autocompletes the only option that's left:
foo.SystemReadWriteFactory
For example, user wants to know what's available in an imaginary "random" library
random.[tab][tab][tab]
A half screen buffer below opens. It shows all available options at the same time. This way, user can glance what's available without cycling trough options one at the time.
User chooses the next option by typing more characters and pressing tab. Focus is always kept on the main code.
After the completion, the half-screen buffer closes automatically. Alternatively, user can close the half-screen buffer by pressing ESC or using arrow keys to move away from completion.
Optionally / in the future, the half screen buffer could show
As pressing tab three times in the middle of completion is not a common sequence of keys typed, it's likely that the half-screen (possible completions) window only shows when user wants it.
Tab: By default, micro tab is bound to "Autocomplete|IndentSelection|InsertTab". So tab is already used for naive autocomplete. This could be changed to "LspComplete|IndentSelection|InsertTab". Alternatively, user could have a separate key for autocompletion.
Half-screen: Show options in half-screen buffer is already used in LSP plugin's show references Alt-R.
Linux / Bash / iPython style autocomplete: Already used in popular Linux shells and familiar to Linux users.
Complete, then show options: The leading alternative Python shell Jupyter uses this in iPython3. The most popular Linux shell Bash uses this style.
Key bindings are not working on mac. I tried the keybindins with gopls and deno lsp.
I see there is a branch dedicated to the key binding issue on mac, but there seems to be no progress for a while now.
the plugin works with Zig language server.
hover, definition lookup, formatting, looking up references, those work fine.
Ctrl-space for completion though throws the error below
Lua API error: main:475: attempt to index a non-table object(nil) with key 'start'
stack traceback:
main:475: in function 'response'
main:295: in main chunk
[G]: ?
completion with pyhon works though
EDIT: in order for plugin to work with ZLS, I had to edit main.lua and add manually 'zig=zls' in both
function startServer(filetype, callback)v
function init()
zls must be in $PATH
Originally posted by @raidenXR in #16 (comment)
It's from different editor but still could be useful. https://github.com/orbitalquark/textadept-lsp/blob/default/init.lua
It seems like the micro editor performance issue: "re-analyze" (re apply the color scheme or something else what it does) whole file on every char input.
It freezes for a while and then hangs again on every char input,
the htop shows big CPU consumption in that time (see attached screenshots) :(
Steps to reproduce:
Micro Commit hash: 68d88b57 (Version: 2.0.13)
OS: Manjaro Linux 23.1.4 (Arch Linux)
Terminal: kitty
Lsp version: 0.6.2
On Mac, pressing the alt key enables you to type other symbols (•ª•¶¢º¡ª), so therefore it just types that symbol instead of using the keyboard shortcuts
I am using https://github.com/python-lsp/python-lsp-server installed with [all]
option.
When I go to a Rune such as os.pa
and hit Ctrl+Space
I expected the autocomplete to give me os.pa[th]
but is is giving me os.pa[path]
Is there any config I need to add?
Thanks again
I originally asked this in a different repo, but as advised it does make a lot more sense to ask this here
Basically I:m having a hard time getting the below to work
This looks amazing, thanks @AndCake
I ran
micro -plugin install lsp
pip install "python-lsp-server[rope,ruff,pylsp-mypy]"
pip install pylsp-mypy
Then set my ~/.config/micro/settings.json
to
{
"lsp.server": "python=pylsp",
"lsp.formatOnSave": true,
"lsp.tabcompletion": true,
"lsp.autocompleteDetails": false
}
which, for some reason, after quitting micro automatically gets rewritten to
{
"lsp.server": "python=pylsp"
}
After this, the commands (ctrl+space, alt+k, alt+r, alt+d) either don't work or are incredibly delayed. I have yet to get the others to work, but I after smashing ctrl+space over and over again something did eventually show up, however
gc.
shows ArithmeticError
, AssertionError
, etc. instead of say collect
)gc.colle
just wipes out the .colle
instead of autocompleting, which I assumed was possible as shown hereI was hoping someone could point me in the right direction? Is there something I forgot to configure or some docs that I missed on accident?
I am trying to set up the LSP for Julia, after having just done it successfully for Helix.
The relevant variable in ~/.config/helix.config.toml is
language-server = { command = "julia", args = [
"--project=@helix-lsp",
"--startup-file=no",
"--history-file=no",
"-e",
"using LanguageServer; runserver()"
] }
So the language server is started by running the following command from the shell:
julia --project=@helix-lsp --startup-file=no --history-file=no -e "using LanguageServer; runserver()"
I take it that what I need to do is to define that command in ~/.config/micro/settings.json, as in the following pseudocode:
"lsp.server": "python=pyls, rust=rls, julia=my_command",
My initial issue is that my command uses "
symbols. Can those simply be escaped, as in the following attempt?
"lsp.server": "python=pyls, rust=rls, julia=julia --project=@helix-lsp --startup-file=no --history-file=no -e \"using LanguageServer; runserver()\"",
Because I see no effect from this.
Or would I have to define a shell script that launches the language server? Could you provide an example of what that file should look like, and where it should be saved?
When LSP plugin is enabled, micro freezes on big markdown files.
Bypass the bug by removing Markdown from lsp.server in settings.json, details below.
When I have micro lsp plugin enabled, opening a large (15k+ lines) Markdown file freezes micro. To continue, I have to kill it from another terminal. Without lsp plugin, micro opens the file normally.
Logs and process list show that unrelated language servers are loaded.
What I expected to happen: no language servers should be loaded. Especially, unrelated Go language server gopls should not be loaded.
What actually happens:
This short file (foo.md) can be edited normally, unlike large MarkDown files that freeze micro.
Logs show that gopls is loaded, and gopls also visible in process list ('ps -a|grep gpls). Process tree shows that gopls is started by micro. Logs say that many language servers are loaded (picked lines from long log):
2022/04/20 08:36:31 Starting server python
2022/04/20 08:36:31 Starting server go
2022/04/20 08:36:31 Starting server typescript
2022/04/20 08:36:31 Starting server javascript
2022/04/20 08:36:31 Starting server markdown
2022/04/20 08:36:31 Starting server json
2022/04/20 08:36:31 Found running lsp server for markdown firing textDocument/didOpen...
2022/04/20 08:36:31 send markdown queueing textDocument/didOpen
2022/04/20 08:36:31 go message Loading packages...
GOPATH=[redacted]
GOSUMDB=sum.golang.org
GOROOT=[redacted]
Update:
The bug is bypassed by disabling markdown in ~/.config/micro/settings.json
"lsp.server": "python=pylsp,go=gopls,rust=rls,lua=lua-lsp",
After this, large Markdown files can be opened normally.
In main.lua, it seems that default value for lsp.server is defined in two different ways:
local fallback = "python=pylsp,go=gopls,typescript=deno lsp,javascript=deno lsp,markdown=deno lsp,json=deno lsp,jsonc=deno lsp,rust=rls,lua=lua-lsp"
-- ...
config.RegisterCommonOption("lsp", "server", "python=pylsp,go=gopls,typescript=deno lsp,javascript=deno lsp,rust=rls,lua=lua-lsp")
It seems like micro-plugin-lsp doesn't work with clangd and ccls, i.e. none of lsp features can be triggered.
Here is part of my settings.json
file with micro-plugin-lsp configuration:
"lsp.server": "cpp=clangd --log=error",
"lsp.autocompleteDetails": false,
"lsp.formatOnSave": false,
"lsp.ignoreMessages": "LS message1 to ignore|LS message 2 to ignore|...",
"lsp.ignoreTriggerCharacters": "completion,signature",
"lsp.tabcompletion": true
Any but one: lsp.server
Thank you for LSP support, AndCake!
"Find references" would be useful addition for navigating code.
User puts cursor over "myFunction(foo, bar=123)" and presses alt-S. A list of all calls to myFunction() are listed. User chooses one of the uses. The file opens in a new tab, on the row making a call to myFunction().
The plugin already supports "hover"/"show function signature" (alt-K) and "jump to definition" (alt-D). The reverse option, finding all uses of function, variable or class under cursors would help navigating code.
The UI of alt-K and alt-D is very obvious and successful. Both of them have a single result, so pressing the key can immediately perform the action. But usually, there are many references, and user must choose which of those he wants to jump to.
The choice could be presented with fzf fuzzy search, micro "command bar" style or a drop down menu.
For fzf fuzzy search, the approach could be similar to my micro jump plugin. The upsides are that it's pleasant to use. The downside is that it requires fzf installed, which requires extra steps on systems lacking package managers, like Windows. Fzf is written in Go, so maybe it could be included in micro some day. Any plugin requiring user to choose something could benefit from this, and there are already multiple plugins using fzf.
For micro command bar implementation, there is already tab completion and possibility to show different options while user is typing. I don't know if this interface is conveniently available to plugins. As the space for showing different options is limited to a single line, this might not be an ideal UI.
Drop down menu has been tested in completion support that never made it to micro. I don't know if micro supports drop downs or not. Depending on how it's done, there might be more space to show all the references. Drop down menus should not jump on your face automatically.
The feature could have a mnemonic name related to the shortcut, for example Alt-S -> Search references, alt-L List refereces.
I wonder if this is "find references" in LSP:
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
After setting config value to "javascript=typescript-language-server --stdio", plugin starts deno lsp.
Language servers take configuration from the client. For some language servers, LSP client settings are the only comprehensive way to send settings, and default settings are unusable for some projects.
Update: micro-plugin-lsp can now ignore specific messages, which can solve the situation described here. See help/lsp.md for lsp.ignoreMessages.
For example, in Python language server linting is disabled trough configuration sent by the LSP client (below).
Without sending settings to LSP server, LSP is not usable in projects with conventions differing from defaults. For example, in one project every indented line shows "W191 indentation contains tabs".
python-lsp/python-lsp-server#37
{
"language_servers": {
"pylsp": {
"serverSettings": {
"pylsp.plugins.pycodestyle.enabled": false,
"pylsp.plugins.pydocstyle.enabled": false,
"pylsp.plugins.pyflakes.enabled": false,
"pylsp.plugins.pylint.enabled": false,
"pylsp.plugins.mccabe.enabled": false,
}
}
}
}
Other closed bugs show that authors of this language server expect users to supply options trough their LSP client.
Pylsp provides many configuration options: https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md
When I exit micro it re-writes the setting.json file and removes the lsp.server value.
I am running micro master and micro-plugin-lsp master.
Removing all other plugins did not help.
For example, in C++
#include <iostream>
int main()
{
std::cou <HERE>
Try to complete std::cout
. The proposed choice removes the typed 'u'. You can't iterate on the completions either, if you press Ctrl + Space, the line is indented instead.
I don't think Ctrl+Space should ever trigger a "tab" command.
Yet, this works:
#include <iostream>
struct T
{
void onSomething() {}
void onReturn() {}
}
int main()
{
T t;
t.on <HERE>
Here, you can iterate the 2 choices... But if you validate the completion by pressing right key, sometimes (not everytime), a additional space is added after the completion. Pressing "tab" only indent the line
Finally, if autoCompleteDetails
is true, it opens a pane with only the function return type or a lot of empty lines like this:
1 #include <iostream>
2
3 class Test{
4 public:
5 void test(){
6 std::cout<<"Test"<<std::endl;
7 }
8 void test2() {}
9 };
10
>>11 int main(){
12 Test test;
13 test.test2 (test)// After pressing Ctrl+Space here completion event should be triggered but nothing happens
>>14 return 0;
15 }
>>16
a.cpp + (13,17) | ft:c++ | unix | utf-8 Alt-g: bindings, Ctrl-Backspace: help
1 Test 2 3 int 4 5 6 7 8 9 10
11
12
13 size_t
14
15
16
17
18
19
20
21
22
23 void
24 void
25
26
27
28 bool
29
30
31
32
33
34 bool
35 std::nullptr_t
36
37
38
39
40 size_t
I have been using rust analyser (as opposed to rls) over the past few weeks on termux.
It required building from source using cargo, however once rust analyser was installed it worked fine with your plugin.
Fyi in case you wanted to add it to the readme.
Hi AndCake, thanks for micro-plugin-lsp
!
Sometimes typescript-language-server
sends JSON-RPC messages quickly enough that micro-plugin-lsp
's onStdout
function receives 2 messages in its text
parameter. The first message is accepted but the second message is ignored.
As a result, micro-plugin-lsp
does not send textDocument/didOpen
and typescript-language-server
rejects some subsequent messages.
To reproduce this problem, open a simple javascript file from the command line multiple times:
micro -debug test.js
The problem happens about 50% of the time for me.
I'd like to provide a PR I can't yet see how to cleanly fix this problem without a significant refactor of onStdout
. I'm hoping that you can see a quick and easy fix.
Thank you once again.
The server does not start if the file is opened via the filemanager plugin. I'm not sure which plugin causes this issue, so I'm filing it here for now.
LSP servers written with vscode-languageserver-node (library for node) don't seem to work wiht this micro client plugin. For example the official example server: https://github.com/microsoft/vscode-extension-samples/blob/main/lsp-sample/server/src/server.ts
onInitialized
seems to never be called. Though I looked into it, I have no idea why 😕 Also tried Vetur / fork
I realize this is only a demo client implementation, just thought you might wanna know. Thanks for doing this, it's awesome! If this worked and also did autocompletion (no idea how complex that is), this could indeed solve the entire issue of LSP in micro.
I installed JDT-LS 1.9.0 using a Brew formula, then added it to settings.json like so:
"lsp.server": "java=jdt-ls,python=pyls,go=gopls,typescript=deno lsp
│ ={\"importMap\": \"./import_map.json\"}",
On launching Micro, I get
Lua API error: main:291: attempt to index a non-table object(nil) with key 'capabilities'
stack traceback:
main:291: in main chunk
[G]: ?
At a quick glance, this is probably related to line 292 in main.lua:
capabilities[filetype] = data.result.capabilities or {}
Could this be an issue with the language server or the plugin?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.