Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8dba10b
typo: consumer
nvarner Aug 4, 2025
2c5a2f2
set up basic indexing infrastructure
nvarner Aug 5, 2025
2c0a0bf
look up indexed file to handle requests
nvarner Aug 7, 2025
c6348c2
rough edged indexer
nvarner Aug 12, 2025
78f6785
check that we don't miss Refs
nvarner Aug 13, 2025
6e77a52
respect arg info origin in indexer
nvarner Aug 15, 2025
7af7bd2
deduplicate simultaneous declaration/definition
nvarner Aug 15, 2025
f5bf5ef
write ASTs to file for debugging purposes
nvarner Aug 15, 2025
aef4fc1
don't reindex record type
nvarner Aug 15, 2025
2f51524
deduplicate decl/defs in let bindings
nvarner Aug 15, 2025
5b4f545
test functions without definitions/declarations
nvarner Aug 15, 2025
23c647b
deduplicate data/record params
nvarner Aug 18, 2025
63ae4b6
check for duplicate declarations
nvarner Aug 18, 2025
da1b1d0
rename ServerM to ServerT
nvarner Aug 18, 2025
8235f28
preliminary document symbol handler
nvarner Sep 14, 2025
800901d
respond to files opening, closing, and saving
nvarner Sep 28, 2025
a6754e1
refactor handlers, handle errors
nvarner Oct 27, 2025
269caa4
use unqualified symbol name
nvarner Oct 31, 2025
001d043
no anonymous function symbols
nvarner Nov 1, 2025
768f723
support Agda 2.8.0 indexing
nvarner Nov 1, 2025
094a883
support Agda 2.8.0 file management
nvarner Nov 1, 2025
91ec6d4
support Agda 2.8.0 in tests
nvarner Nov 1, 2025
6e86f66
Agda 2.7.0.1 compatibility fixes
nvarner Nov 1, 2025
b4b4172
better support for include paths
nvarner Nov 9, 2025
958e6b7
clear state before loading files
nvarner Nov 9, 2025
688a1a8
test reloading is compatible with changes
nvarner Nov 9, 2025
811d5da
index module params as children of module
nvarner Nov 9, 2025
8505671
show fewer document symbols
nvarner Nov 9, 2025
f29df32
Agda 2.6.4.3 compatibility
nvarner Nov 9, 2025
58be9bd
Broken library resolution unit tests
nvarner Nov 15, 2025
42a325f
agda lib search without fs
nvarner Nov 16, 2025
919a563
fix getChildrenImpl for os
nvarner Nov 17, 2025
c6aa276
Better lib resolution
nvarner Nov 18, 2025
57c68f1
Now works cross Agda version
nvarner Nov 18, 2025
65614f1
Actually use new lib resolution
nvarner Nov 18, 2025
56c2203
Really actually use new lib resolution
nvarner Nov 18, 2025
39b8a61
Don't let Agda print to stdout
nvarner Nov 19, 2025
5bfd102
Don't send file contents on save
nvarner Nov 19, 2025
7ee1627
Split AgdaLib into AgdaProject and AgdaLib
nvarner Nov 20, 2025
f141206
Remove unused imports
nvarner Nov 22, 2025
1fb3974
Very WIP library dependency resolution
nvarner Nov 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
cabal-dev
dist
dist-*
test/data/AST/
node_modules/
*.o
*.hi
Expand Down
83 changes: 75 additions & 8 deletions agda-language-server.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.37.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -49,10 +49,23 @@ library
exposed-modules:
Agda
Agda.Convert
Agda.Interaction.Imports.More
Agda.Interaction.Imports.Virtual
Agda.Interaction.Library.More
Agda.Interaction.Library.Parse.More
Agda.IR
Agda.Parser
Agda.Position
Agda.Syntax.Abstract.More
Agda.TypeChecking.Monad.Options.More
Control.Concurrent.SizedChan
Indexer
Indexer.Indexer
Indexer.Monad
Indexer.Postprocess
Indexer.Prepare
Language.LSP.Protocol.Types.More
Language.LSP.Protocol.Types.Uri.More
Monad
Options
Render
Expand All @@ -68,9 +81,23 @@ library
Render.TypeChecking
Render.Utils
Server
Server.AgdaLibResolver
Server.AgdaProjectResolver
Server.CommandController
Server.Filesystem
Server.Handler
Server.Handler.TextDocument.DocumentSymbol
Server.Handler.TextDocument.FileManagement
Server.Model
Server.Model.AgdaFile
Server.Model.AgdaLib
Server.Model.AgdaProject
Server.Model.Handler
Server.Model.InstalledLibsFile
Server.Model.Monad
Server.Model.Symbol
Server.ResponseController
Server.VfsIndex
Switchboard
other-modules:
Paths_agda_language_server
Expand All @@ -81,7 +108,7 @@ library
OverloadedStrings
PatternSynonyms
TypeOperators
ghc-options: -Wincomplete-patterns -Wunused-do-bind -Wunused-foralls -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -Werror=incomplete-patterns -fno-warn-orphans
ghc-options: -Wincomplete-patterns -Werror=incomplete-patterns -Wunused-local-binds -Wunused-pattern-binds -Wunused-do-bind -Wunused-foralls -Wunused-imports -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -Wsimplifiable-class-constraints -fno-warn-orphans
build-depends:
Agda
, aeson
Expand All @@ -92,6 +119,7 @@ library
, filepath
, lsp >=2
, lsp-types >=2
, modern-uri
, mtl
, network
, network-simple ==0.4.2
Expand Down Expand Up @@ -127,7 +155,7 @@ executable als
OverloadedStrings
PatternSynonyms
TypeOperators
ghc-options: -Wincomplete-patterns -Wunused-do-bind -Wunused-foralls -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -rtsopts -Werror=incomplete-patterns -fno-warn-orphans
ghc-options: -Wincomplete-patterns -Werror=incomplete-patterns -Wunused-local-binds -Wunused-pattern-binds -Wunused-do-bind -Wunused-foralls -Wunused-imports -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -Wsimplifiable-class-constraints -fno-warn-orphans -rtsopts
build-depends:
Agda
, aeson
Expand All @@ -139,6 +167,7 @@ executable als
, filepath
, lsp >=2
, lsp-types >=2
, modern-uri
, mtl
, network
, network-simple ==0.4.2
Expand All @@ -160,23 +189,47 @@ executable als
if arch(wasm32)
build-depends:
unix >=2.8.0.0 && <2.9
ghc-options: -with-rtsopts=-V1
else
if !arch(wasm32)
ghc-options: -threaded -with-rtsopts=-N

test-suite als-test
type: exitcode-stdio-1.0
main-is: Test.hs
other-modules:
Test.AgdaLibResolution
Test.Indexer
Test.Indexer.Invariants
Test.Indexer.Invariants.NoDuplicateDecl
Test.Indexer.Invariants.NoMissing
Test.Indexer.Invariants.NoOverlap
Test.Indexer.NoAnonFunSymbol
Test.Indexer.Reload
Test.LSP
Test.Model
Test.ModelMonad
Test.SrcLoc
Test.Uri
Test.WASM
TestData
Agda
Agda.Convert
Agda.Interaction.Imports.More
Agda.Interaction.Imports.Virtual
Agda.Interaction.Library.More
Agda.Interaction.Library.Parse.More
Agda.IR
Agda.Parser
Agda.Position
Agda.Syntax.Abstract.More
Agda.TypeChecking.Monad.Options.More
Control.Concurrent.SizedChan
Indexer
Indexer.Indexer
Indexer.Monad
Indexer.Postprocess
Indexer.Prepare
Language.LSP.Protocol.Types.More
Language.LSP.Protocol.Types.Uri.More
Monad
Options
Render
Expand All @@ -192,9 +245,23 @@ test-suite als-test
Render.TypeChecking
Render.Utils
Server
Server.AgdaLibResolver
Server.AgdaProjectResolver
Server.CommandController
Server.Filesystem
Server.Handler
Server.Handler.TextDocument.DocumentSymbol
Server.Handler.TextDocument.FileManagement
Server.Model
Server.Model.AgdaFile
Server.Model.AgdaLib
Server.Model.AgdaProject
Server.Model.Handler
Server.Model.InstalledLibsFile
Server.Model.Monad
Server.Model.Symbol
Server.ResponseController
Server.VfsIndex
Switchboard
Paths_agda_language_server
hs-source-dirs:
Expand All @@ -205,7 +272,7 @@ test-suite als-test
OverloadedStrings
PatternSynonyms
TypeOperators
ghc-options: -Wincomplete-patterns -Wunused-do-bind -Wunused-foralls -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -rtsopts -Werror=incomplete-patterns -fno-warn-orphans
ghc-options: -Wincomplete-patterns -Werror=incomplete-patterns -Wunused-local-binds -Wunused-pattern-binds -Wunused-do-bind -Wunused-foralls -Wunused-imports -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -Wsimplifiable-class-constraints -fno-warn-orphans -rtsopts
build-depends:
Agda
, aeson
Expand All @@ -217,6 +284,7 @@ test-suite als-test
, lsp >=2
, lsp-test
, lsp-types >=2
, modern-uri
, mtl
, network
, network-simple ==0.4.2
Expand All @@ -242,6 +310,5 @@ test-suite als-test
if arch(wasm32)
build-depends:
unix >=2.8.0.0 && <2.9
ghc-options: -with-rtsopts=-V1
else
if !arch(wasm32)
ghc-options: -threaded -with-rtsopts=-N
2 changes: 0 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import Control.Monad (when)
import Options
import Server (run)
-- import Simple (run)
import System.Console.GetOpt
import System.Directory (doesDirectoryExist)
import System.Environment
import System.FilePath ((</>))
import System.IO
import Text.Read (readMaybe)

#if MIN_VERSION_Agda(2,8,0)
import Agda.Setup (setup)
Expand Down
91 changes: 26 additions & 65 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ when:
- condition: "arch(wasm32)"
dependencies:
- unix >= 2.8.0.0 && < 2.9
- condition: "!arch(wasm32)"
ghc-options:
- -threaded
- -with-rtsopts=-N

dependencies:
- base >= 4.7 && < 5
Expand All @@ -62,6 +66,7 @@ dependencies:
- filepath
- lsp-types >= 2
- lsp >= 2
- modern-uri
- mtl
- network
- network-simple == 0.4.2
Expand All @@ -77,48 +82,32 @@ default-extensions:
- PatternSynonyms
- TypeOperators

ghc-options:
- -Wincomplete-patterns
- -Werror=incomplete-patterns
- -Wunused-local-binds
- -Wunused-pattern-binds
- -Wunused-do-bind
- -Wunused-foralls
- -Wunused-imports
- -Wwarnings-deprecations
- -Wwrong-do-bind
- -Wmissing-fields
- -Wmissing-methods
- -Wmissing-pattern-synonym-signatures
- -Wmissing-signatures
- -Wsimplifiable-class-constraints
- -fno-warn-orphans

library:
source-dirs: src
ghc-options:
- -Wincomplete-patterns
- -Wunused-do-bind
- -Wunused-foralls
- -Wwarnings-deprecations
- -Wwrong-do-bind
- -Wmissing-fields
- -Wmissing-methods
- -Wmissing-pattern-synonym-signatures
- -Wmissing-signatures
- -Werror=incomplete-patterns
- -fno-warn-orphans
when:
- condition: "!arch(wasm32)"
ghc-options:
- -threaded
- -with-rtsopts=-N

executables:
als:
main: Main.hs
source-dirs: app
main: Main.hs
source-dirs: app
ghc-options:
- -Wincomplete-patterns
- -Wunused-do-bind
- -Wunused-foralls
- -Wwarnings-deprecations
- -Wwrong-do-bind
- -Wmissing-fields
- -Wmissing-methods
- -Wmissing-pattern-synonym-signatures
- -Wmissing-signatures
- -rtsopts
- -Werror=incomplete-patterns
- -fno-warn-orphans
when:
- condition: "!arch(wasm32)"
ghc-options:
- -threaded
- -with-rtsopts=-N
dependencies:
- agda-language-server

Expand All @@ -128,39 +117,11 @@ tests:
source-dirs:
- test
- src
ghc-options:
- -rtsopts
dependencies:
- lsp-test
- tasty
- tasty-hunit
- tasty-golden
- tasty-quickcheck

ghc-options:
- -Wincomplete-patterns
- -Wunused-do-bind
- -Wunused-foralls
- -Wwarnings-deprecations
- -Wwrong-do-bind
- -Wmissing-fields
- -Wmissing-methods
- -Wmissing-pattern-synonym-signatures
- -Wmissing-signatures
- -rtsopts
- -Werror=incomplete-patterns
- -fno-warn-orphans
when:
- condition: "!arch(wasm32)"
ghc-options:
- -threaded
- -with-rtsopts=-N

# tests:
# als-test:
# main: Spec.hs
# source-dirs: test
# ghc-options:
# - -threaded
# - -rtsopts
# - -with-rtsopts=-N
# dependencies:
# - agda-language-server
Loading