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

Support vim #33

Closed
chrissimon-au opened this issue Feb 1, 2022 · 19 comments
Closed

Support vim #33

chrissimon-au opened this issue Feb 1, 2022 · 19 comments
Labels
IDE Tagging issues for adding Contextive to a new IDE

Comments

@chrissimon-au
Copy link
Contributor

See https://learnvimscriptthehardway.stevelosh.com/

@chrissimon-au chrissimon-au added the IDE Tagging issues for adding Contextive to a new IDE label Feb 1, 2022
@chrissimon-au
Copy link
Contributor Author

chrissimon-au commented Oct 10, 2023

See discussion on #49:

  1. Start with documentation on how to add lspconfig manually as done by @erikjuhani - will rely on Release Language Server as independent Component #50
  2. Contribute to https://github.com/neovim/nvim-lspconfig and https://github.com/mason-org/mason-registry for official managed distributions

@chrissimon-au
Copy link
Contributor Author

Hi @erikjuhani , thanks for offering to help with this! This is really just looking for documentation at this point. The current README.md in the root has a heading ## Installation which just has Visual Studio Code as the only subheading at the moment.

For this task, please add a neovim subheading and instructions. If the instructions are more than a paragraph, please add them to a README.md in a new folder: src/neovim/README.md and link there from the root README

@erikjuhani
Copy link
Contributor

Got it @chrissimon-au, thanks! I’ll start working on this next 👍

@chrissimon-au
Copy link
Contributor Author

@erikjuhani - FYI, I've just released https://github.com/dev-cycles/contextive/releases/tag/v1.10.0 which includes your change regarding the default setting, and the uploading of the language server binary (in a zip file) into the release artifacts. This might be helpful for you when testing the vim installation instructions you're preparing on this issue 🙂

@chrissimon-au
Copy link
Contributor Author

Update to this, it seems the zip and release process only worked on linux. Will get it fixed shortly which will be in 1.10.1

@chrissimon-au
Copy link
Contributor Author

ok - 1.10.1 fixes the issue and has all the language server binaries for various platforms attached - hope that works for you with getting it working with vim! https://github.com/dev-cycles/contextive/releases/tag/v1.10.1

@erikjuhani
Copy link
Contributor

@erikjuhani - FYI, I've just released https://github.com/dev-cycles/contextive/releases/tag/v1.10.0 which includes your change regarding the default setting, and the uploading of the language server binary (in a zip file) into the release artifacts. This might be helpful for you when testing the vim installation instructions you're preparing on this issue 🙂

Thanks @chrissimon-au! I'll start working on this the coming week.

ok - 1.10.1 fixes the issue and has all the language server binaries for various platforms attached - hope that works for you with getting it working with vim! https://github.com/dev-cycles/contextive/releases/tag/v1.10.1

Looks great! I'll let you know how it goes! 👍

@erikjuhani
Copy link
Contributor

erikjuhani commented Oct 21, 2023

I've prepared a branch for adding Contextive Language Server to nvim-lspconfig. Please let me know if the changes I did seem appropriate! My main concerns are the description field and the naming. Is contextive-ls a good name or should it be something like contextive-language-server?

@erikjuhani
Copy link
Contributor

Here's the PR to include contextive in the mason-registry mason-org/mason-registry#3428.

@erikjuhani
Copy link
Contributor

Here's the PR to include the contextive in nvim-lspconfig: neovim/nvim-lspconfig#2888

@chrissimon-au
Copy link
Contributor Author

Thanks so much @erikjuhani, this is great!

One observation - the 'name' of the languageclient in the lspconfig option is Contextive.LanguageServer - perhaps for simplicity we just call it Contextive ? While we do use a 'language server' as a component, most users will just know the tool as Contextive across the various IDEs. (e.g. vscode just has Contextive as the name in the extension marketplace).

This seems consistent with the mason registry configuration which just has contextive as the name.

@erikjuhani
Copy link
Contributor

One observation - the 'name' of the languageclient in the lspconfig option is Contextive.LanguageServer - perhaps for simplicity we just call it Contextive ? While we do use a 'language server' as a component, most users will just know the tool as Contextive across the various IDEs. (e.g. vscode just has Contextive as the name in the extension marketplace).

This seems consistent with the mason registry configuration which just has contextive as the name.

It's actually the name of the binary that's generated from the zip file. I can investigate whether changing the binary name might be complex. The binary name is only visible within the code and when inspecting the LSP info.

This is the current nvim contextive setup 😄 (without the custom path):

lspconfig.contextive.setup {}

I'll begin to update the documentation to include the mason-registry option, and simplify the setup example.

The lsp info:

lsp-info

@chrissimon-au
Copy link
Contributor Author

Ah! That makes more sense - I see now it's the cmd property, not the name property 🤦‍♂️

Nice one, thanks :)

@chrissimon-au
Copy link
Contributor Author

chrissimon-au commented Nov 15, 2023

Ok - v1.10.3 is on the way... just noticed that the version number is baked into the mason-registry file - I assume that mean we'll need a new PR on mason for each contextive release? how do other plugins handle this in the vim world, is there automation tooling we could leverage and hook into our release pipeline to auto-create the PR with the bumped version?

@erikjuhani
Copy link
Contributor

Ok - v1.10.3 is on the way... just noticed that the version number is baked into the mason-registry file - I assume that mean we'll need a new PR on mason for each contextive release? how do other plugins handle this in the vim world, is there automation tooling we could leverage and hook into our release pipeline to auto-create the PR with the bumped version?

Fortunately we don’t have to do anything! Mason-registry has automation to update the version number in the package definition file by leveraging renovate bot. Here’s the PR it created: mason-org/mason-registry#3467

@chrissimon-au
Copy link
Contributor Author

Brilliant!

OK - so to close this ticket, is there anything else we should do? Now that it's in lspconfig and mason, should we update the README.md to recommend their use? The current README.md includes a custom lspconfig option which I think isn't necessary anymore?

@erikjuhani
Copy link
Contributor

Brilliant!

OK - so to close this ticket, is there anything else we should do? Now that it's in lspconfig and mason, should we update the README.md to recommend their use? The current README.md includes a custom lspconfig option which I think isn't necessary anymore?

Yep! I’ll be making an update for it today!

I can’t think of anything else that needs to be done, and if something comes up I think it can be a new issue instead. 🤔

@erikjuhani
Copy link
Contributor

I think, however, that some other platforms should be considered like coc, ale and vim-lsp, but I suppose those can be supported by some configuration examples in the README.

@chrissimon-au
Copy link
Contributor Author

Thanks so much for all your work on this @erikjuhani! this is looking great - 🙏

I've closed this ticket with the doco updates you've provided on #59, and I'm happy to comfortably say that contextive is now truly multi-IDE! We can track the other neovim platforms on other tickets/PRs.

If you want to go ahead and do config doco for coc, ale and vim-lsp don't let me stop you - but also, I haven't seen any demand for that yet, so I'm happy to wait until folk start asking for it - totally up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE Tagging issues for adding Contextive to a new IDE
Projects
None yet
Development

No branches or pull requests

2 participants