Sublime Forum

LSP / pyls: unable to disable plugin

#1

Hi all.
I’m giving a shot to LSP, starting from pyls. I’m trying to disable the pycodestyle plugin.
Following the example at https://lsp.readthedocs.io/en/latest/ , I addted to my project configuration:

"settings": {
	"LSP": {
		"pyls": {
			"enabled": true,
			"plugins": {
				"pycodestyle": {
					"enabled": false
				}
			}
		}
	},
},

On saving the project file all the code hinting disappears (I guess Sublime Text reloads the configuration and restarts LSP) but after a moment all my code gets riddled of warning coming from pycodestyle. I tried to disable one single warnings as described on LSP documentation but it had no effect either.
Disabling the whole pyls server, settings -> LSP -> pyls -> enabled: false, works.

What I’m doing wrong?

Thanks

0 Likes

#2

If I’m not mistaken, with the latest ST3 release the following should work for your .sublime-project file:

// Your .sublime-project file
{
    "build_systems": [
        // ... your build systems ...
    ],
    "folders": [
        // ... your folders ...
    ],
    // project-specific view settings
    "settings": {
        // project-specific LSP settings
        "LSP": {
            // override pyls configuration
            "pyls": {
                // every server configuration has an "enabled" key that you may override
                "enabled": true,
                // every server configuration has a "settings" key that you may override
                // exactly what these settings are differ per language server
                "settings": {
                    // disable pycodestyle
                    "pyls.plugins.pycodestyle.enabled": false
                }
            }
        }
    }
}

The docs are outdated in this regard.

0 Likes

#3

Thanks a lot!

0 Likes