Skip to content

Commit 0fd58f5

Browse files
author
kokobd
committed
upgrade lsp
1 parent d0e3e0f commit 0fd58f5

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

Diff for: cabal.project

+15-4
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,24 @@ source-repository-package
6565
tag: 7a0af7a8fd38045fd15fb13445bdcc7085325460
6666
-- https://github.com/tibbe/ekg-json/pull/12
6767

68-
-- Needed for ghcide-bench until a new release of lsp-test is out
68+
-- Remove me when a new version of lsp is released
6969
source-repository-package
7070
type:git
71-
location: https://github.com/haskell/lsp
71+
location: https://github.com/kokobd/lsp
72+
subdir: lsp
73+
tag: 80ebd816454a9e44d4cd93793ef3badc661b0f2f
74+
75+
source-repository-package
76+
type:git
77+
location: https://github.com/kokobd/lsp
78+
subdir: lsp-types
79+
tag: 80ebd816454a9e44d4cd93793ef3badc661b0f2f
80+
81+
source-repository-package
82+
type:git
83+
location: https://github.com/kokobd/lsp
7284
subdir: lsp-test
73-
tag: c95eb06c70c35f1e13c37ed11a7d9e5b36bfa2e8
74-
-- https://github.com/haskell/lsp/pull/450
85+
tag: 80ebd816454a9e44d4cd93793ef3badc661b0f2f
7586

7687
allow-newer:
7788
-- ghc-9.2

Diff for: ghcide/src/Development/IDE/Types/Location.hs

+1-5
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ toNormalizedFilePath' "" = emptyFilePath
5050
toNormalizedFilePath' fp = LSP.toNormalizedFilePath fp
5151

5252
emptyFilePath :: LSP.NormalizedFilePath
53-
#if MIN_VERSION_lsp_types(1,3,0)
54-
emptyFilePath = LSP.normalizedFilePath emptyPathUri ""
55-
#else
56-
emptyFilePath = LSP.NormalizedFilePath emptyPathUri ""
57-
#endif
53+
emptyFilePath = LSP.emptyNormalizedFilePath
5854

5955
-- | We use an empty string as a filepath when we don’t have a file.
6056
-- However, haskell-lsp doesn’t support that in uriToFilePath and given

Diff for: hls-plugin-api/src/Ide/PluginUtils.hs

+1-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ fullRange s = Range startPos endPos
217217
lastLine = fromIntegral $ length $ T.lines s
218218

219219
subRange :: Range -> Range -> Bool
220-
subRange smallRange range = _start smallRange >= _start range && _end smallRange <= _end range
221-
222-
positionInRange :: Position -> Range -> Bool
223-
positionInRange p (Range sp ep) = sp <= p && p < ep -- Range's end position is exclusive, see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range
220+
subRange = isSubrangeOf
224221

225222
-- ---------------------------------------------------------------------
226223

0 commit comments

Comments
 (0)