nix-community / nix-ts-mode

An Emacs major mode for editing Nix expressions, powered by tree-sitter [maintainer=@remi-gelinas]
https://github.com/nix-community/nix-ts-mode
Other
50 stars 9 forks source link

feat: inherit Eglot's nix-mode settings #38

Closed Icy-Thought closed 2 months ago

Icy-Thought commented 2 months ago

Reason for this change is to inherit the defined configuration for nix-mode within eglot-server-programs to automate the process of setting up Eglot for this mode.

Current (as of commit date) value for nix-mode found within eglot-server-programs:

(nix-mode . ,(eglot-alternatives '("nil" "rnix-lsp" "nixd")))
Icy-Thought commented 2 months ago

That's the main reason why I encapsulated the function with a functionp statement! Not everyone will have access to this new feature, but if they do then they get the extra benefit that it could bring to this package! :)

purcell commented 2 months ago

That's the main reason why I encapsulated the function with a functionp statement!

Yep, appreciated that, thanks. :)

purcell commented 2 months ago

Comment was meant as "huh, today I learned" as much as anything.

Icy-Thought commented 2 months ago

Aha, gotcha! Glad to help out! :smile:

purcell commented 2 months ago

Merged now, thank you!