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

Neovim LSP Support #198

Open
PorcoRosso85 opened this issue Mar 1, 2023 · 5 comments
Open

Neovim LSP Support #198

PorcoRosso85 opened this issue Mar 1, 2023 · 5 comments

Comments

@PorcoRosso85
Copy link

Describe the solution you'd like
A imprementation LSP integration to Neovim buildin lsp

Your thought?
Maybe for not small amount of user..

@pschanely
Copy link
Owner

So! CrossHair ships with an LSP server built in! (docs)

I am not familiar with neovim, but as you say, it also appears to have built-in LSP support. (docs)

In theory they might just happen to work together. Would you be willing to check it out, see whether it works, and report back? I fit works, we might add a little section for the docs for example IDE configuration snippets.

@PorcoRosso85
Copy link
Author

Sounds great.
Excuse me because I'm just neovim user, I can't imprement external lsp configuration.

I would be glad if someone reading this knows that users are already potential.

@pschanely
Can that someone who implemented this contact you if they complete the implementation?

@pschanely
Copy link
Owner

I poked around just now and got it to work! You just run the vim.lsp.start command with cmd = {'python', '-m', 'crosshair', 'server'}; e.g.:

:lua vim.lsp.start({name = 'ch-lsp', cmd = {'python', '-m', 'crosshair', 'server'}, root_dir = '.'})

The only trick is that you have to make sure that the python you execute is the one for your project. (and that crosshair is installed for that python environment)

Screen Shot 2023-03-02 at 6 26 38 AM

I'll add something to the docs this week with the command above. Thank you for the suggestion!

@PorcoRosso85
Copy link
Author

Thanks.

I've tried, but there is no response.
Excuse me, let me know how to debug depite that contract is broken.
Anything is wrong?

Maybe this issue is also in same issue.
#199

@PorcoRosso85
Copy link
Author

PorcoRosso85 commented Mar 3, 2023

Your command is runnable.
Thanks.

It can be a plugin if we imprement a plugin lua file to run whenever neovim will run

スクリーンショット 2023-03-03 10 48 38

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

No branches or pull requests

2 participants