File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 69
69
( pkgs . haskell . lib . justStaticExecutables ( pkgs . haskell . lib . dontCheck pkgs . haskellPackages . opentelemetry-extra ) )
70
70
capstone
71
71
# ormolu
72
- # stylish-haskell
72
+ stylish-haskell
73
73
pre-commit
74
74
] ++ lib . optionals ( ! stdenv . isDarwin )
75
75
[ # tracy has a build problem on macos.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ main = do
16
16
```
17
17
18
18
Foo.hs
19
- ```
19
+ ``` haskell
20
20
module Foo where
21
21
22
22
doSomething :: IO ()
@@ -29,4 +29,4 @@ Some very important explanation
29
29
-}
30
30
```
31
31
32
- Using "Go-to-definition on the Note reference in ` Main.hs ` will jump to the beginning of the note in ` Foo.hs ` .
32
+ Using "Go-to-definition" on the Note reference in ` Main.hs ` will jump to the beginning of the note in ` Foo.hs ` .
Original file line number Diff line number Diff line change 1
1
module Ide.Plugin.Notes (descriptor , Log ) where
2
2
3
- import Control.Lens (ix , (^.) , (^? ) )
3
+ import Control.Lens ((^.) )
4
4
import Control.Monad.Except (throwError )
5
5
import Control.Monad.IO.Class (liftIO )
6
6
import Control.Monad.Trans (lift )
@@ -82,7 +82,8 @@ jumpToNote state _ param
82
82
let Position l c = param ^. L. position
83
83
contents <- fmap _file_text . err " Error getting file contents"
84
84
=<< lift (LSP. getVirtualFile uriOrig)
85
- line <- err " Line not found in file" (Rope. lines contents ^? ix (fromIntegral l))
85
+ line <- err " Line not found in file" (listToMaybe $ Rope. lines $ fst
86
+ (Rope. splitAtLine 1 $ snd $ Rope. splitAtLine (fromIntegral l) contents))
86
87
note <- err " No note at this position" $ listToMaybe $
87
88
mapMaybe (atPos $ fromIntegral c) $ matchAllText noteRefRegex line
88
89
notes <- runActionE " notes.definedNotes" state $ useE MkGetNotes nfp
You can’t perform that action at this time.
0 commit comments