Comments (2)
I can verify that I'm getting the same issue, and I'm able to reproduce it consistently. Basically, I have to wait for about 5-10 seconds after neovim opens a haskell file to start typing or else I hit the same case as @MangoIV.
Basic repro steps:
- Create a new cabal project with a Main.hs
- As soon as a haskell file is opened in neovim, begin modifying the file so that the code is incorrect (for example, delete the argument to putStrLn).
- The LSP hangs indefinitely
The odd thing is, this behavior continues even after I attempt to reboot the LSP. I have to completely close out of neovim and restart to get it working again.
I've attached the log file from when I was reproing this. I used the --debug flag as suggested.
As well, I seemed to get these errors when saving the file in neovim:
Error detected while processing BufWritePre Autocommands for "<buffer=4>":
LSP[haskell-tools.nvim] Error condition, please check your setup and/or the [issue tracker](https://github.com/haskell
/haskell-language-server/issues):
ormolu: Internal Error: ormoluCmd: OrmoluParsingFailed (RealSrcSpan SrcSpanPoint "/Users/ryan/src/dailycode/fair_coin_
flips/Main.hs" 4 1 Nothing) "[GHC-58481] parse error (possibly incorrect indentation or mismatched brackets)"
"~/src/dailycode/fair_coin_flips/Main.hs" 3L, 41B written
E492: Not an editor command: Lspinfo
Error detected while processing BufWritePre Autocommands for "<buffer=4>":
LSP[haskell-tools.nvim] Error condition, please check your setup and/or the [issue tracker](https://github.com/haskell
/haskell-language-server/issues):
ormolu: Internal Error: ormoluCmd: OrmoluParsingFailed (RealSrcSpan SrcSpanPoint "/Users/ryan/src/dailycode/fair_coin_
flips/Main.hs" 4 1 Nothing) "[GHC-58481] parse error (possibly incorrect indentation or mismatched brackets)"
"Main.hs" 2L, 19B written
Error detected while processing BufWritePre Autocommands for "<buffer=4>":
LSP[haskell-tools.nvim] Error condition, please check your setup and/or the [issue tracker](https://github.com/haskell
/haskell-language-server/issues):
ormolu: Internal Error: ormoluCmd: OrmoluParsingFailed (RealSrcSpan SrcSpanPoint "/Users/ryan/src/dailycode/fair_coin_
flips/Main.hs" 4 1 Nothing) "[GHC-58481] parse error (possibly incorrect indentation or mismatched brackets)"
"Main.hs" 3L, 41B written
The incorrect indentation or mismatched brackets error persists even when the code is this in my editor:
module Main where
main :: IO ()
main = putStrLn "foo"
Which seems to tell me that haskell-language-server got stuck looking at an old version of the file.
hls.log
from haskell-language-server.
Could you add some logs where this particular issue happens? Perferably with --debug
?
from haskell-language-server.
Related Issues (20)
- Drop support for GHC 9.2 HOT 1
- Get benchmarks working on 9.10
- Add Haskell Error Index to "code description" entry in diagnostics HOT 2
- Unwanted Completions in Comments HOT 1
- GNUmakefile needs to be patched for cabal-3.12
- Improve the error message when there is a typo in the Cabal file HOT 3
- HLS gets stuck if session setup fails for any reason HOT 1
- definition.Imported symbol (reexported) fails without `$TEMPDIR/hls-test-root`
- Adding `{-# OPTIONS_GHC -Wno-all #-}` at the top of the file makes HLS cease to report errors, not only warnings.
- Multiple Components option is not documented in the online manual
- Custom notifications for starting and finishing rules
- Don't use completions for cabal file codeactions
- Renaming a record data constructor also renames record fields HOT 1
- Is ghcide-bench supposed to be built and installed by default? HOT 7
- How can I pass custom build options JUST to HLS? HOT 2
- Goto definition of local library seems not working until I load the library once. HOT 5
- Invalid snippet syntax causes failures in neovim text editor
- Reaching path length limit in Windows
- `Could not load module` error in test suites with custom build type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell-language-server.