Skip to content

Conversation

@stasjok
Copy link
Contributor

@stasjok stasjok commented Jul 21, 2024

Option plugins.lsp.servers.vls.autoSetFiletype adds filetype extension by default, even when plugins.lsp.servers.vls.enable = false. I think this is not intended behavior.

My main goal is to make files submodules to produce empty configs by default. When I do

files."ftplugin/nix.lua".localOpts.shiftwidth = 2;

I expect ftplugin/nix.lua to have only this option, and nothing else.

@traxys
Copy link
Member

traxys commented Jul 21, 2024

(You may want to rebase on main for the commit attribution)

@traxys traxys merged commit 06261fc into nix-community:main Jul 21, 2024
};
extraConfig = cfg: { filetype.extension = mkIf cfg.autoSetFiletype { v = "vlang"; }; };
extraConfig = cfg: {
filetype.extension = mkIf (cfg.enable && cfg.autoSetFiletype) { v = "vlang"; };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the issue here is actually _mk-lsp.nix not having mkIf cfg.enable like the other mkPlugins do in our helper lib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants