zk-org / zk-nvim

Neovim extension for zk
https://github.com/zk-org/zk
GNU General Public License v3.0
502 stars 40 forks source link

Use already attached externally setup lsp client if available #105

Closed mr-majkel closed 1 year ago

mr-majkel commented 1 year ago

Hi @mickael-menu,

I have prepared a solution for #104 and more generally a situation when zk lsp is set up outside zk-nvim (e.g. through lsp config).

The reason for going this route is connected with the builtin zk lsp setup seems to be broken for Windows (that I know is not supported officially). I think that because of improper path handling the root_dir is not found. lsp config is using their own util function to find a dir with .zk directory, that seems to do the trick.

I think that having an option to use externally started server is still a feature worth to have. In case multiple zk-lsp servers are started and successfully attached to any buffer, the first one found by name is used. If none are found, zk-nvim starts its own and it takes the precedence from then on.

github-actions[bot] commented 1 year ago

This pull request has been automatically marked as stale because it has not had recent activity.

mickael-menu commented 1 year ago

Oops, I thought I merged your PR. Sorry about that @mr-majkel.