The following MR https://invent.kde.org/utilities/kate/-/merge_requests/342#note_211353 introduced adding "()" after completing an item of function kind. In Haskell even things like "x = 1" are basically 0-ary functions and are reported as such by Haskell LSP. Consequently, Kate places "()" for every completion I select, which in turn produce invalid Haskell syntax. Maybe this feature could be an option?
Can't reproduce this with the OCaml language server.
Hmm, valid issue. Waqar, what do you think? Perhaps it would make sense to have this turned on/off via some entry in the LSP JSON file? Then one could turn this on just for languages that actually want () for function calls. Or perhaps there is even a nicer solution.
I believe, it should be an option in the "Settings" UI of the "LSP" plugin. As for JSON option, I don't mind.
(In reply to Gleb Popov from comment #3) > I believe, it should be an option in the "Settings" UI of the "LSP" plugin. > As for JSON option, I don't mind. Hmm, I don't think a option in the settings UI would not be that useful, given many people work with multiple languages, it will still be wrong for some then. We can already configure this "correctly" for the pre-shipped LSP stuff and people can then fine tune it for their own servers.
All right, if you think so, I'm fine with JSON option too.
The problem with this whole thing is that it is completely wrong even though it is helpful sometimes. It can be a pain with C/C++ easily, consider: - &Class::PtrToFunc One can introduce a new Json option but I think it is not the right solution. We need to reverse this and come up with a better way, something that utilizes the lsp info automatically to decide whether inserting brackets makes sense or not.
Reverting the change is fine for me, too.
Should be fixed for 21.08 https://invent.kde.org/utilities/kate/-/commit/f82159c82ed3ca90117304079a5515f5374091f7