Coder Social home page Coder Social logo

Comments (2)

rmullin7286 avatar rmullin7286 commented on July 28, 2024 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:

  1. Create a new cabal project with a Main.hs
  2. 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).
  3. 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.

fendor avatar fendor commented on July 28, 2024

Could you add some logs where this particular issue happens? Perferably with --debug?

from haskell-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.