Giter Club home page Giter Club logo

Comments (6)

tomv564 avatar tomv564 commented on May 27, 2024

Agree, this is a must-have as currently LSP is an always-on setup.
What solutions do you think will work best?

  • A command that writes a project-specific setting to disable a language server by name?
  • The ability to configure a language server at the project level instead of at the package level?

from lsp.

randy3k avatar randy3k commented on May 27, 2024

I guess there should be an option to disable a server globally via LSP.sublime-settings and also a project specific setting to enable/disable certain servers.

For the LSP.sublime-settings, something like

{
  "clients":
      "pyls":
      {
        "enable": false,
        "command": ["pyls"],
        "scopes": ["source.python"],
        "syntaxes": ["Packages/Python/Python.sublime-syntax"],
        "languageId": "python"
      }
}

plus a toggle command LSP: Toggle Servers Globally should be sufficient.

As for the project settings, we can add a key LSP, and all settings from LSP.sublime-settings will be honored from this key. A project aware command like LSP: Toggle Servers for current project may be useful.

from lsp.

tomv564 avatar tomv564 commented on May 27, 2024

The configuration to support this was merged in #74.
There is some discussion about what the default language server configuration should look like in #76.
It would be nice to say Enable or Disable instead of Toggle, but unsure how specific the name of a command in the quick panel can be? (The "Restart Servers" command should perhaps also say "LSP - Restart pyls" for example)

from lsp.

randy3k avatar randy3k commented on May 27, 2024

Enabling ane disabling the servers do make more sense. I also found "Restart Servers" confusing, does it restart all running servers or just restart the server of the current window!?

May be this?

  • LSP: Enable Server Globally
  • LSP: Disable Server Globally
  • LSP: Enable Server for Current Project
  • LSP: Disable Server for Current Project
  • LSP: Restart Server of Current Window Project

I also note that you are loading the project settings from the key LSP of view.settings. I think it should be window.project_data.

from lsp.

tomv564 avatar tomv564 commented on May 27, 2024

Yes, those look like good suggestions, including using window.project_data, thanks!
I've started some work on making these commands part of a first-time setup flow.

from lsp.

tomv564 avatar tomv564 commented on May 27, 2024

#119 added Enable/Disable language server Globally / in Project.
Please let me know if it doesn't work as expected!

from lsp.

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.