zk-org / zk

A plain text note-taking assistant
https://zk-org.github.io/zk/
GNU General Public License v3.0
1.64k stars 121 forks source link

Providing a Language Server (LSP) #22

Open mickael-menu opened 3 years ago

mickael-menu commented 3 years ago

zk can provide a basic integration with any LSP-compatible text editor by shipping a Language Server.

PR #21 implements a proof of concept server showing promising results, but there's more to come:

Feel free to share more ideas!

WhiskeyJack96 commented 1 year ago

Any thoughts on adding TODO support for autocomplete and code actions for switching TODO to DONE? I'd be happy to put up a pr giving it a shot if you'd be interested!

mickael-menu commented 1 year ago

@WhiskeyJack96 IMO this is out of scope for zk. It would be more suited for a task manager plugin.

This discussion could be relevant: https://github.com/mickael-menu/zk-nvim/discussions/88

WhiskeyJack96 commented 1 year ago

@mickael-menu yeah I can see that, is there any plan for or existing/method to extend zk? my workflow currently revolves around using logseq for and then editting my journal notes with Helix in the terminal during work (but helix doesnt currently support plugins or multiple lsps per filetype).

mickael-menu commented 1 year ago

@WhiskeyJack96 I don't think zk will have a plugin system for arbitrary code actions. Sounds like an issue with Helix, that it doesn't support plugins.

However, if you're willing to put in the work, you could just fork zk. Another alternative would be to create your own "composite" LSP server with custom actions and delegating the rest to the zk LSP server. zk is using https://github.com/tliron/glsp under the hood.

pr4th4m commented 8 months ago

Any plans to support textDocument/documentSymbol ?

dotrosedotnet commented 5 months ago

I'm getting

Error executing vim.schedule lua callback: ...w/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.l
ua:1308: RPC[Error] code_name = InvalidParams, message = "Invalid params"
stack traceback:
        [C]: in function 'assert'
        ...w/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1308: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

nvim --version gives me:

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1710088188

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

I installed via homebrew on an m3. Any ideas?

EDIT:

I think this was due to me using the markdown_oxide lsp server, which not only seemed buggy, but would try to run a bunch of html for a russian website in nvim, so...

I'm using marksman now as my lsp server, and everything seems alright.

WhyNotHugo commented 1 month ago

Highlight tags using semantic tokens (client support is still lacking)

Neovim has client support for this and it would be pretty useful.