diff options
| author | William Boman <william@redwill.se> | 2023-05-02 15:48:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-02 15:48:29 +0200 |
| commit | 9377cda51359011330dc396d967b60159aec75aa (patch) | |
| tree | 086157a4d0a008922a5b018273a393c8165d3a5c | |
| parent | chore(main): release 1.2.0 (#216) (diff) | |
| download | mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.tar mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.tar.gz mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.tar.bz2 mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.tar.lz mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.tar.xz mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.tar.zst mason-lspconfig-9377cda51359011330dc396d967b60159aec75aa.zip | |
feat(julials): add convenience settings for symbol cache management (#217)
| -rw-r--r-- | lua/mason-lspconfig/server_configurations/julials/README.md | 19 | ||||
| -rw-r--r-- | lua/mason-lspconfig/server_configurations/julials/init.lua | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lua/mason-lspconfig/server_configurations/julials/README.md b/lua/mason-lspconfig/server_configurations/julials/README.md index 18e6880..cb54b56 100644 --- a/lua/mason-lspconfig/server_configurations/julials/README.md +++ b/lua/mason-lspconfig/server_configurations/julials/README.md @@ -7,3 +7,22 @@ The Julia Environment will be identified in the following order: 1) user configuration (`lspconfig.julials.setup { julia_env_path = "/my/env" }`) 2) if the `Project.toml` & `Manifest.toml` (or `JuliaProject.toml` & `JuliaManifest.toml`) files exists in the current project working directory, the current project working directory is used as the environment 3) the result of `Pkg.Types.Context().env.project_file` + +## Configuring symbol cache + +By default, the language server is configured to download symbol caches from Julia's symbol server. To disable this, set +`symbol_cache_download` to `false`: + +```lua +lspconfig.julials.setup { + symbol_cache_download = false, +} +``` + +To change the symbol server URL, set the `symbol_server` configuration: + +```lua +lspconfig.julials.setup { + symbol_server = "https://symbol-server", +} +``` diff --git a/lua/mason-lspconfig/server_configurations/julials/init.lua b/lua/mason-lspconfig/server_configurations/julials/init.lua index 33ce70b..5a48413 100644 --- a/lua/mason-lspconfig/server_configurations/julials/init.lua +++ b/lua/mason-lspconfig/server_configurations/julials/init.lua @@ -33,6 +33,10 @@ return function() vim.fn.exepath "julia-lsp", env_path, } + config.cmd_env = vim.tbl_extend("keep", config.cmd_env or {}, { + SYMBOL_SERVER = config.symbol_server, + SYMBOL_CACHE_DOWNLOAD = (config.symbol_cache_download == false) and "0" or "1", + }) end, } end |
