emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

changed: lsp-haskell-completion-snippets-on default: t -> lsp-enable-… #125

Closed ncaq closed 3 years ago

ncaq commented 3 years ago

…snippet

If lsp-enable-snippet is disabled, snippet generation will be useless, so it is preferable to turn it off.

I also had a long time trouble with setting this option to nil on lsp-haskell without disabling the snippet. It's good to provide a variable ledge for such users.

michaelpj commented 3 years ago

What happens if lsp-enable-snippet is disabled? Do you get an error?

An alternative would be that where we actually use this variable, we could instead pass (and lsp-enable-snippet lsp-haskell-completion-snippets-on) or something?

ncaq commented 3 years ago

No, I do not receive any error. However, I thought it was useless to calculate snippets when I don't use them.

Also, if anything, the aim of this PR is to prevent users from being confused when they try to disable snippets.

michaelpj commented 3 years ago

I mean users shouldn't be confused since they won't see anything untoward happening. Still, this seems safe.