aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2020-03-02 12:28:47 +0900
committerGitHub <noreply@github.com>2020-03-02 12:28:47 +0900
commit3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac (patch)
treeeab715799aac3b537ee3228f61ed1a911c527cb7
parentMerge pull request #146 from mhartington/feat-html-lsp (diff)
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.tar
nvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.tar.gz
nvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.tar.bz2
nvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.tar.lz
nvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.tar.xz
nvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.tar.zst
nvim-lspconfig-3bcc387ce69a97bf4cb5a1fa75aa7923ae30f5ac.zip
Merge pull request #153 from erw7/fix-clangd-root-dir2
Fix clangd issue on Windows
-rw-r--r--README.md74
-rw-r--r--lua/nvim_lsp/clangd.lua4
-rw-r--r--lua/nvim_lsp/util.lua9
3 files changed, 84 insertions, 3 deletions
diff --git a/README.md b/README.md
index 9fa5f190..18f62e10 100644
--- a/README.md
+++ b/README.md
@@ -1920,6 +1920,12 @@ This server accepts configuration via the `settings` key.
Format loop iterators.
+- **`julia.format.kw`**: `boolean`
+
+ Default: `true`
+
+ Remove spaces around = in function keywords.
+
- **`julia.format.ops`**: `boolean`
Default: `true`
@@ -1932,12 +1938,64 @@ This server accepts configuration via the `settings` key.
Format tuples.
-- **`julia.runLinter`**: `boolean`
+- **`julia.lint.call`**: `boolean`
+
+ Check calls against existing methods. (experimental)
+
+- **`julia.lint.constif`**: `boolean`
+
+ Default: `true`
+
+ Check for constant conditionals of if statements.
+
+- **`julia.lint.iter`**: `boolean`
+
+ Default: `true`
+
+ Check iterator syntax of loops.
+
+- **`julia.lint.lazy`**: `boolean`
+
+ Default: `true`
+
+ Check for deterministic lazy boolean operators.
+
+- **`julia.lint.missingrefs`**: `boolean`
+
+ Default: `true`
+
+ Report possibly missing references.
+
+- **`julia.lint.modname`**: `boolean`
+
+ Default: `true`
+
+ Check for invalid submodule names.
+
+- **`julia.lint.pirates`**: `boolean`
+
+ Default: `true`
+
+ Check for type piracy.
+
+- **`julia.lint.run`**: `boolean`
Default: `true`
Run the linter on active files.
+- **`julia.lint.typeparam`**: `boolean`
+
+ Default: `true`
+
+ Check for unused DataType parameters.
+
+- **`julia.trace.server`**: `enum { "off", "messages", "verbose" }`
+
+ Default: `"off"`
+
+ Traces the communication between VS Code and the language server.
+
- **`julia.useCustomSysimage`**: `boolean`
Default: `"false"`
@@ -2120,6 +2178,14 @@ Can be installed in Nvim with `:LspInstall metals`
This server accepts configuration via the `settings` key.
<details><summary>Available settings:</summary>
+- **`metals.bloopSbtAlreadyInstalled`**: `boolean`
+
+
+
+- **`metals.bloopVersion`**: `string`
+
+
+
- **`metals.customRepositories`**: `array`
Array items: `{type = "string"}`
@@ -2154,7 +2220,7 @@ This server accepts configuration via the `settings` key.
- **`metals.serverVersion`**: `string`
- Default: `"0.8.0"`
+ Default: `"0.8.1"`
</details>
@@ -2887,6 +2953,10 @@ This server accepts configuration via the `settings` key.
Fine grained feature flags to disable annoying features
+- **`rust-analyzer.highlighting.semanticTokens`**: `boolean`
+
+ Use proposed semantic tokens API for syntax highlighting
+
- **`rust-analyzer.highlightingOn`**: `boolean`
Highlight Rust code (overrides built-in syntax highlighting)
diff --git a/lua/nvim_lsp/clangd.lua b/lua/nvim_lsp/clangd.lua
index 59649f8e..34389721 100644
--- a/lua/nvim_lsp/clangd.lua
+++ b/lua/nvim_lsp/clangd.lua
@@ -7,7 +7,9 @@ configs.clangd = {
cmd = {"clangd", "--background-index"};
filetypes = {"c", "cpp", "objc", "objcpp"};
root_dir = function(fname)
- return root_pattern(fname) or util.path.dirname(fname)
+ local filename = util.path.is_absolute(fname) and fname
+ or util.path.join(vim.loop.cwd(), fname)
+ return root_pattern(filename) or util.path.dirname(filename)
end;
};
-- commands = {};
diff --git a/lua/nvim_lsp/util.lua b/lua/nvim_lsp/util.lua
index 433bcab2..82767905 100644
--- a/lua/nvim_lsp/util.lua
+++ b/lua/nvim_lsp/util.lua
@@ -128,6 +128,14 @@ M.path = (function()
end
end
+ local function is_absolute(filename)
+ if is_windows then
+ return filename:match("^%a:") or filename:match("^\\\\")
+ else
+ return filename:match("^/")
+ end
+ end
+
local dirname
do
local strip_dir_pat = path_sep.."([^"..path_sep.."]+)$"
@@ -195,6 +203,7 @@ M.path = (function()
return {
is_dir = is_dir;
is_file = is_file;
+ is_absolute = is_absolute;
exists = exists;
sep = path_sep;
dirname = dirname;