aboutsummaryrefslogtreecommitdiffstats
path: root/CONFIG.md
diff options
context:
space:
mode:
authorgithub-actions <github-actions@github.com>2021-08-17 15:30:22 +0000
committergithub-actions <github-actions@github.com>2021-08-17 15:30:22 +0000
commit62902d21fae90f2b008913074246debec850f2ae (patch)
tree8b534ad6146226131b3ea28bf172421ebb921f68 /CONFIG.md
parentfeat(julials): use a separate package env for LanguageServer.jl (#1153) (diff)
downloadnvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.tar
nvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.tar.gz
nvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.tar.bz2
nvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.tar.lz
nvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.tar.xz
nvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.tar.zst
nvim-lspconfig-62902d21fae90f2b008913074246debec850f2ae.zip
[docgen] Update CONFIG.md
skip-checks: true
Diffstat (limited to 'CONFIG.md')
-rw-r--r--CONFIG.md17
1 files changed, 12 insertions, 5 deletions
diff --git a/CONFIG.md b/CONFIG.md
index 5e44604b..c94c23b4 100644
--- a/CONFIG.md
+++ b/CONFIG.md
@@ -3113,13 +3113,20 @@ require'lspconfig'.jsonls.setup{}
https://github.com/julia-vscode/julia-vscode
-`LanguageServer.jl` can be installed with `julia` and `Pkg`:
+LanguageServer.jl can be installed with `julia` and `Pkg`:
```sh
-julia -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer")'
+julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")'
```
-This installs LanguageServer.jl into your global julia environment.
+where `~/.julia/environments/nvim-lspconfig` is the location where
+the default configuration expects LanguageServer.jl to be installed.
-In order to have LanguageServer.jl pick up installed packages or dependencies in a Julia project, you must first instantiate the project:
+To update an existing install, use the following command:
+```sh
+julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()'
+```
+
+Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a
+Julia project, you must make sure that the project is instantiated:
```sh
julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()'
```
@@ -3436,7 +3443,7 @@ require'lspconfig'.julials.setup{}
Commands:
Default Values:
- cmd = { "julia", "--startup-file=no", "--history-file=no", "-e", ' using Pkg\n Pkg.instantiate()\n using LanguageServer\n depot_path = get(ENV, "JULIA_DEPOT_PATH", "")\n project_path = let\n dirname(something(\n ## 1. Finds an explicitly set project (JULIA_PROJECT)\n Base.load_path_expand((\n p = get(ENV, "JULIA_PROJECT", nothing);\n p === nothing ? nothing : isempty(p) ? nothing : p\n )),\n ## 2. Look for a Project.toml file in the current working directory,\n ## or parent directories, with $HOME as an upper boundary\n Base.current_project(),\n ## 3. First entry in the load path\n get(Base.load_path(), 1, nothing),\n ## 4. Fallback to default global environment,\n ## this is more or less unreachable\n Base.load_path_expand("@v#.#"),\n ))\n end\n @info "Running language server" VERSION pwd() project_path depot_path\n server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)\n server.runlinter = true\n run(server)\n ' }
+ cmd = { "julia", "--startup-file=no", "--history-file=no", "-e", ' # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig\n # with the regular load path as a fallback\n ls_install_path = joinpath(\n get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),\n "environments", "nvim-lspconfig"\n )\n pushfirst!(LOAD_PATH, ls_install_path)\n using LanguageServer\n popfirst!(LOAD_PATH)\n depot_path = get(ENV, "JULIA_DEPOT_PATH", "")\n project_path = let\n dirname(something(\n ## 1. Finds an explicitly set project (JULIA_PROJECT)\n Base.load_path_expand((\n p = get(ENV, "JULIA_PROJECT", nothing);\n p === nothing ? nothing : isempty(p) ? nothing : p\n )),\n ## 2. Look for a Project.toml file in the current working directory,\n ## or parent directories, with $HOME as an upper boundary\n Base.current_project(),\n ## 3. First entry in the load path\n get(Base.load_path(), 1, nothing),\n ## 4. Fallback to default global environment,\n ## this is more or less unreachable\n Base.load_path_expand("@v#.#"),\n ))\n end\n @info "Running language server" VERSION pwd() project_path depot_path\n server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)\n server.runlinter = true\n run(server)\n ' }
filetypes = { "julia" }
on_new_config = function(new_config, root_dir)
new_config.cmd_cwd = root_dir