Open LiraOnGithub opened 3 years ago
I am also hit by this bug. Using emacs here. (I've disabled the usual emacs indent stuff since I do use tabs.)
I tried digging a bit in the code but the only thing relating to tabs that I could find are Language.LSP.Protocol.Types.FormattingOptions._tabSize
and Language.LSP.Protocol.Lens.HasTabSize
I could not find a single place in the code where a FormattingOptions
is set with a tabsize of 8. Could it be that it is read from a config file?
I think this may be ultimately related to https://github.com/haskell/haskell-language-server/issues/2646 and our broken handling of unicode.
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:Which OS do you use: Ubuntu
Which lsp-client do you use: Vim with Coc
Describe your project (alternative: link to the project): stack-project
Contents of
hie.yaml
:Steps to reproduce
Type the following code
And request information about
putStr
Expected behaviour
I should get a pop-up with type information and a short description.
Actual behaviour
I get a pop-up about
IO
instead. If I put my cursor further ahead, over the string "hello", I do get information aboutputStr
. It seems HLS treats a tab as 8 separate characters. Setting a tab-size of 8 does not help, since it is still one character.Include debug information
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The first part is when the cursor is on `putStr` and gives information about `IO`, the second part is when the cursor is on the last part of "hello" and gives information about `putStr` File: [hls-output.txt](https://github.com/haskell/haskell-language-server/files/6727553/hls-output.txt) Gist: [hls-output.txt gist](https://gist.github.com/LiraOnGithub/42d94188632e3343a83f9e98a24bd149) Please let me know if you need more of the output.