Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper set-up for the plugin #55

Open
ryan-caesar-ramos opened this issue Mar 6, 2024 · 1 comment
Open

Proper set-up for the plugin #55

ryan-caesar-ramos opened this issue Mar 6, 2024 · 1 comment

Comments

@ryan-caesar-ramos
Copy link

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

micro_lsp micro_lsp

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

  1. the completions don't seem to be for what precedes (i.e. ctrl+space after gc. shows ArithmeticError, AssertionError, etc. instead of say collect)
  2. trying to ctrl+space after gc.colle just wipes out the .colle instead of autocompleting, which I assumed was possible as shown here

I 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?

@AndCake
Copy link
Owner

AndCake commented Mar 20, 2024

When you started micro with a .py file, can you check if the LSP server is actually started? It should show up in the list of processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants