Giter Site home page Giter Site logo

Comments (8)

williamboman avatar williamboman commented on September 12, 2024

Ah this is due to the fact that jsonls, cssls and html all share the same installer location (they all use the same underlying package). If one is installed - the rest are also considered installed.

What kind of problems is it causing for you? I'm wondering if it'd make sense to add an opt-in flag that would allow decoupling these installers from one another and effectively treat them as separate servers altogether. Would be helpful to know more how it's messing up your use case first though!

from nvim-lsp-installer.

williamboman avatar williamboman commented on September 12, 2024

Btw I've pushed a POC to branch federated-servers-opt-out, where if you set vim.g.lsp_installer_allow_federated_servers = false (g:lsp_installer_allow_federated_servers = 0) before interacting with the plugin (if you use packer that'd be in the setup function) it'll not use the same install directory across servers

from nvim-lsp-installer.

alex-popov-tech avatar alex-popov-tech commented on September 12, 2024

so here is my config:
https://github.com/alex-popov-tech/.dotfiles/blob/master/nvim/.config/nvim/lua/lsp/init.lua#L18-L30
basically i keep settings for each lsp server separated, and using server.name as part of module path, so when i install servers A B C im assuming that i need to have 3 modules with settings, and since there is only iterator-like thing from api point of view, i should place a guard to skip iterating on lsp servers i did not install :)

from nvim-lsp-installer.

alex-popov-tech avatar alex-popov-tech commented on September 12, 2024

so i have only onserver callback which iterates through servers i didn't expect to see because i did not install them :)

from nvim-lsp-installer.

williamboman avatar williamboman commented on September 12, 2024

basically i keep settings for each lsp server separated, and using server.name as part of module path, so when i install servers A B C im assuming that i need to have 3 modules with settings, and since there is only iterator-like thing from api point of view, i should place a guard to skip iterating on lsp servers i did not install :)

Gotcha! Do you think something like #67 would solve this?

from nvim-lsp-installer.

alex-popov-tech avatar alex-popov-tech commented on September 12, 2024

oh, i see...
so this pr can only restrict installing these at all, not allowing install them one by one, right?

from nvim-lsp-installer.

williamboman avatar williamboman commented on September 12, 2024

No the idea with that PR is to allow setting a global variable to control whether server installations should be allowed to be federated/bundled or not. In your case, bundled installations is not preferred as you want/need full control of which servers is made available. I figured it'd make sense to keep it being the default behavior, to preserve disk space but also add to the "seamlessness" of it all.

This plugin considers a server to be installed if a certain directory exist or not. In the main branch it happens to be that html, cssls & jsonls all share the same install directory, because they all use the same npm package behind the scenes. #67 makes it possible to opt-out of this behavior, and instead make it so that each LSP server always has its own install directory.

so this pr can only restrict installing these at all, not allowing install them one by one, right?

It will still allow you to install all servers, it'll just require you to do it one by one!

from nvim-lsp-installer.

alex-popov-tech avatar alex-popov-tech commented on September 12, 2024

tbo i did not understand the code, but i checked branch as user installing servers one by one, and it works fine, so LGTM!

from nvim-lsp-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.