Skip to content

Commit

Permalink
Merge branch 'master' into complete-functions-with-parens
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb authored Apr 5, 2024
2 parents d47ed38 + 1cc14a9 commit aa20390
Show file tree
Hide file tree
Showing 30 changed files with 770 additions and 243 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
2 changes: 1 addition & 1 deletion .github/workflows/jlpkgbutler-ci-master-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8']
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jlpkgbutler-ci-pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8']
julia-version: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
Expand Down
49 changes: 26 additions & 23 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
name = "LanguageServer"
uuid = "2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7"
version = "4.3.2-DEV"
version = "4.5.1"

[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Tokenize = "0796e94c-ce3b-5d07-9a54-7f471281c624"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
StaticLint = "b3cc710f-9c33-5bdb-a03d-a94903873e97"
CSTParser = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
JSONRPC = "b9b8584e-8fd3-41f9-ad0c-7255d428e418"
CSTParser = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
StaticLint = "b3cc710f-9c33-5bdb-a03d-a94903873e97"
SymbolServer = "cf896787-08d5-524d-9de7-132aaa0cb996"
TestItemDetection = "76b0de8b-5c4b-48ef-a724-914b33ca988d"

[extras]
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
Tokenize = "0796e94c-ce3b-5d07-9a54-7f471281c624"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
CSTParser = "3.3"
JSON = "0.20, 0.21"
julia = "1"
JSONRPC = "1.1"
JuliaFormatter = "0.20.0, 0.21, 0.22, 0.23, 1"
CSTParser = "3.3"
URIs = "1.3"
PrecompileTools = "1"
StaticLint = "8.0"
Tokenize = "0.5.10"
JSONRPC = "1.1"
SymbolServer = "7.1"
TestItemDetection = "0.1.1"
TestItemDetection = "0.2.0"
Tokenize = "0.5.10"
URIs = "1.3"
julia = "1"

[extras]
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"

[targets]
test = ["Test", "Sockets", "LibGit2", "Serialization", "SHA", "TestItemRunner"]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ make use of the Julia Language Server for various code editing features:
- [Emacs](../../wiki/Emacs)
- [Sublime Text](https://github.com/tomv564/LSP)
- [Kakoune](../../wiki/Kakoune)
- [Helix](https://uncomfyhalomacro.pl/blog/14/)
- [Kate](../../wiki/Kate)
- [Others](https://microsoft.github.io/language-server-protocol/implementors/tools/)

## Installation and Usage
**Documentation**: [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://www.julia-vscode.org/LanguageServer.jl/dev)
Expand All @@ -41,3 +44,7 @@ julia --project=/path/to/LanguageServer.jl/environment \
If `env_path` is not specified, the language server will run on the
parent project of `pwd` or on the default `.julia/environments/v#.#`
if there is no parent project.

## Development of the VSCode extension

See https://github.com/julia-vscode/julia-vscode/wiki for information on how to test this package with the VSCode extension
85 changes: 44 additions & 41 deletions src/LanguageServer.jl
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
module LanguageServer
using JSON, REPL, CSTParser, JuliaFormatter, SymbolServer, StaticLint
using CSTParser: EXPR, Tokenize.Tokens, Tokenize.Tokens.kind, headof, parentof, valof, to_codeobject
using StaticLint: refof, scopeof, bindingof
using UUIDs
using Base.Docs, Markdown
import JSONRPC
using JSONRPC: Outbound, @dict_readable
import TestItemDetection

export LanguageServerInstance, runserver

include("URIs2/URIs2.jl")
using .URIs2

JSON.lower(uri::URI) = string(uri)

include("exception_types.jl")
include("protocol/protocol.jl")
include("extensions/extensions.jl")
include("textdocument.jl")
include("document.jl")
include("juliaworkspace.jl")
include("languageserverinstance.jl")
include("multienv.jl")
include("runserver.jl")
include("staticlint.jl")

include("requests/misc.jl")
include("requests/textdocument.jl")
include("requests/features.jl")
include("requests/hover.jl")
include("requests/completions.jl")
include("requests/workspace.jl")
include("requests/actions.jl")
include("requests/init.jl")
include("requests/signatures.jl")
include("requests/highlight.jl")
include("utilities.jl")

end
module LanguageServer
using JSON, REPL, CSTParser, JuliaFormatter, SymbolServer, StaticLint
using CSTParser: EXPR, Tokenize.Tokens, Tokenize.Tokens.kind, headof, parentof, valof, to_codeobject
using StaticLint: refof, scopeof, bindingof
using UUIDs
using Base.Docs, Markdown
import JSONRPC
using JSONRPC: Outbound, @dict_readable
import TestItemDetection
import Logging
using PrecompileTools

export LanguageServerInstance, runserver

include("URIs2/URIs2.jl")
using .URIs2

JSON.lower(uri::URI) = string(uri)

include("exception_types.jl")
include("protocol/protocol.jl")
include("extensions/extensions.jl")
include("textdocument.jl")
include("document.jl")
include("juliaworkspace.jl")
include("languageserverinstance.jl")
include("multienv.jl")
include("runserver.jl")
include("staticlint.jl")

include("requests/misc.jl")
include("requests/textdocument.jl")
include("requests/features.jl")
include("requests/hover.jl")
include("requests/completions.jl")
include("requests/workspace.jl")
include("requests/actions.jl")
include("requests/init.jl")
include("requests/signatures.jl")
include("requests/highlight.jl")
include("utilities.jl")
include("precompile.jl")

end
17 changes: 15 additions & 2 deletions src/extensions/extensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,29 @@ end
code_range::Union{Nothing,Range}
option_default_imports::Union{Nothing,Bool}
option_tags::Union{Nothing,Vector{String}}
error::Union{Nothing,String}
end

struct PublishTestItemsParams <: Outbound
@dict_readable struct TestSetupDetail <: Outbound
name::String
range::Range
code::Union{Nothing,String}
code_range::Union{Nothing,Range}
end

@dict_readable struct TestErrorDetail <: Outbound
range::Range
error::String
end

struct PublishTestsParams <: Outbound
uri::DocumentUri
version::Union{Int,Missing}
project_path::String
package_path::String
package_name::String
testitemdetails::Vector{TestItemDetail}
testsetupdetails::Vector{TestSetupDetail}
testerrordetails::Vector{TestErrorDetail}
end

include("messagedefs.jl")
2 changes: 1 addition & 1 deletion src/extensions/messagedefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ const julia_getModuleAt_request_type = JSONRPC.RequestType("julia/getModuleAt",
const julia_getCurrentBlockRange_request_type = JSONRPC.RequestType("julia/getCurrentBlockRange", VersionedTextDocumentPositionParams, Tuple{Position, Position, Position})
const julia_getDocAt_request_type = JSONRPC.RequestType("julia/getDocAt", VersionedTextDocumentPositionParams, String)
const julia_getDocFromWord_request_type = JSONRPC.RequestType("julia/getDocFromWord", NamedTuple{(:word,),Tuple{String}}, String)
const textDocument_publishTestitems_notification_type = JSONRPC.NotificationType("julia/publishTestitems", PublishTestItemsParams)
const textDocument_publishTests_notification_type = JSONRPC.NotificationType("julia/publishTests", PublishTestsParams)
Loading

0 comments on commit aa20390

Please sign in to comment.