File tree 5 files changed +35
-6
lines changed
5 files changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) .
6
6
7
- ## v0.2.6.4.0 - unreleased
7
+ ## v0.2.6.4.0.2 - 2023-12-14
8
+
9
+ ### Fixed
10
+ - Add missing handlers for ` lsp ` methods.
11
+ - Patch path to the "data" directory when the executable is built on GitHub Actions.
12
+
13
+ ## v0.2.6.4.0.0 - 2023-12-12
8
14
9
15
### Changed
10
16
- Embed Agda-2.6.4.
Original file line number Diff line number Diff line change 1
1
cabal-version : 1.12
2
2
3
- -- This file has been generated from package.yaml by hpack version 0.36.0 .
3
+ -- This file has been generated from package.yaml by hpack version 0.35.2 .
4
4
--
5
5
-- see: https://github.com/sol/hpack
6
6
7
7
name : agda-language-server
8
- version : 0.2.6.4.0
8
+ version : 0.2.6.4.0.2
9
9
synopsis : An implementation of language server protocal (LSP) for Agda 2.
10
10
description : Please see the README on GitHub at <https://github.com/agda/agda-language-server#readme>
11
11
category : Development
@@ -83,6 +83,8 @@ library
83
83
, base >= 4.7 && < 5
84
84
, bytestring
85
85
, containers
86
+ , directory
87
+ , filepath
86
88
, lsp < 2
87
89
, lsp-types < 2
88
90
, mtl
@@ -125,6 +127,8 @@ executable als
125
127
, base >= 4.7 && < 5
126
128
, bytestring
127
129
, containers
130
+ , directory
131
+ , filepath
128
132
, lsp < 2
129
133
, lsp-types < 2
130
134
, mtl
@@ -194,6 +198,8 @@ test-suite als-test
194
198
, base >= 4.7 && < 5
195
199
, bytestring
196
200
, containers
201
+ , directory
202
+ , filepath
197
203
, lsp < 2
198
204
, lsp-types < 2
199
205
, mtl
Original file line number Diff line number Diff line change 1
1
module Main where
2
2
3
+ import Control.Monad (when )
3
4
import Options
4
5
import Server (run )
5
6
import System.Console.GetOpt
6
- import System.Environment (getArgs )
7
+ import System.Directory (doesDirectoryExist )
8
+ import System.Environment
9
+ import System.FilePath ((</>) )
7
10
import System.IO
8
11
import Text.Read (readMaybe )
9
12
@@ -14,6 +17,16 @@ main = do
14
17
hSetEncoding stdout utf8
15
18
hSetEncoding stdin utf8
16
19
20
+ -- The GitHub CI-built executable lacks the correct data directory path.
21
+ -- If there's directory named "data" in the executable's directory,
22
+ -- then we assume that the executable is built by GitHub CI
23
+ -- and we should set the $Agda_datadir environment variable to the correct directory.
24
+ executablePath <- getExecutablePath
25
+ let dataDir = executablePath </> " data"
26
+ isBuiltByCI <- doesDirectoryExist dataDir
27
+ when isBuiltByCI $ do
28
+ setEnv " Agda_datadir" dataDir
29
+
17
30
options <- getOptionsFromArgv
18
31
if optHelp options
19
32
then putStrLn usageMessage
Original file line number Diff line number Diff line change 1
1
name : agda-language-server
2
- version : 0.2.6.4.0.1
2
+ version : 0.2.6.4.0.2
3
3
github : " banacorn/agda-language-server"
4
4
license : MIT
5
5
author : " Ting-Gian LUA"
@@ -55,6 +55,8 @@ dependencies:
55
55
- aeson
56
56
- bytestring
57
57
- containers
58
+ - directory
59
+ - filepath
58
60
- lsp-types < 2
59
61
- lsp < 2
60
62
- mtl
Original file line number Diff line number Diff line change @@ -110,7 +110,9 @@ handlers =
110
110
result <- Handler. onHover uri pos
111
111
responder $ Right result,
112
112
notificationHandler SInitialized $ \ _not -> pure () ,
113
- notificationHandler STextDocumentDidOpen $ \ _not -> pure ()
113
+ notificationHandler STextDocumentDidOpen $ \ _not -> pure () ,
114
+ notificationHandler STextDocumentDidSave $ \ _not -> pure () ,
115
+ notificationHandler STextDocumentDidChange $ \ _not -> pure ()
114
116
-- -- syntax highlighting
115
117
-- , requestHandler STextD_cumentSemanticTokensFull $ \req responder -> do
116
118
-- result <- Handler.onHighlight (req ^. (params . textDocument . uri))
You can’t perform that action at this time.
0 commit comments