aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/docgen.yml7
-rw-r--r--README.md658
-rw-r--r--lua/nvim_lsp/bashls.lua2
-rw-r--r--lua/nvim_lsp/ccls.lua2
-rw-r--r--lua/nvim_lsp/clangd.lua2
-rw-r--r--lua/nvim_lsp/configs.lua14
-rw-r--r--lua/nvim_lsp/cssls.lua2
-rw-r--r--lua/nvim_lsp/dartls.lua2
-rw-r--r--lua/nvim_lsp/dockerls.lua2
-rw-r--r--lua/nvim_lsp/elmls.lua1
-rw-r--r--lua/nvim_lsp/flow.lua2
-rw-r--r--lua/nvim_lsp/fortls.lua2
-rw-r--r--lua/nvim_lsp/ghcide.lua2
-rw-r--r--lua/nvim_lsp/gopls.lua2
-rw-r--r--lua/nvim_lsp/hie.lua2
-rw-r--r--lua/nvim_lsp/intelephense.lua2
-rw-r--r--lua/nvim_lsp/jsonls.lua2
-rw-r--r--lua/nvim_lsp/julials.lua1
-rw-r--r--lua/nvim_lsp/leanls.lua2
-rw-r--r--lua/nvim_lsp/metals.lua2
-rw-r--r--lua/nvim_lsp/nimls.lua1
-rw-r--r--lua/nvim_lsp/ocamlls.lua2
-rw-r--r--lua/nvim_lsp/pyls.lua7
-rw-r--r--lua/nvim_lsp/pyls_ms.lua2
-rw-r--r--lua/nvim_lsp/rls.lua2
-rw-r--r--lua/nvim_lsp/rust_analyzer.lua2
-rw-r--r--lua/nvim_lsp/solargraph.lua2
-rw-r--r--lua/nvim_lsp/sumneko_lua.lua1
-rw-r--r--lua/nvim_lsp/terraformls.lua2
-rw-r--r--lua/nvim_lsp/texlab.lua1
-rw-r--r--lua/nvim_lsp/tsserver.lua2
-rw-r--r--lua/nvim_lsp/vimls.lua2
-rw-r--r--lua/nvim_lsp/vuels.lua2
-rw-r--r--lua/nvim_lsp/yamlls.lua2
-rw-r--r--scripts/README_template.md10
35 files changed, 626 insertions, 125 deletions
diff --git a/.github/workflows/docgen.yml b/.github/workflows/docgen.yml
index 78ccdf6c..1a19c7dc 100644
--- a/.github/workflows/docgen.yml
+++ b/.github/workflows/docgen.yml
@@ -7,6 +7,13 @@ jobs:
runs-on: [ubuntu-latest]
if: github.ref != 'master'
steps:
+ - name: Setup Dart
+ run: |
+ sudo apt install apt-transport-https
+ sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
+ sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
+ sudo apt update
+ sudo apt install dart
- uses: actions/checkout@v1
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
diff --git a/README.md b/README.md
index 593d806d..27e8ad94 100644
--- a/README.md
+++ b/README.md
@@ -76,6 +76,7 @@ local nvim_lsp = require'nvim_lsp'
nvim_lsp.texlab.setup{
name = 'texlab_fancy';
log_level = vim.lsp.protocol.MessageType.Log;
+ message_level = vim.lsp.protocol.MessageType.Log;
settings = {
latex = {
build = {
@@ -106,7 +107,6 @@ if not nvim_lsp.foo_lsp then
root_dir = function(fname)
return nvim_lsp.util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
- log_level = vim.lsp.protocol.MessageType.Warning;
settings = {};
};
}
@@ -168,8 +168,12 @@ nvim_lsp.SERVER.setup{config}
Server may specify a default value.
{log_level}
- controls the level of logs to show from build processes and other
- window/logMessage events. Defaults to
+ controls the level of logs to show from window/logMessage notifications. Defaults to
+ vim.lsp.protocol.MessageType.Warning instead of
+ vim.lsp.protocol.MessageType.Log.
+
+ {message_level}
+ controls the level of messages to show from window/showMessage notifications. Defaults to
vim.lsp.protocol.MessageType.Warning instead of
vim.lsp.protocol.MessageType.Log.
@@ -204,6 +208,7 @@ that config.
- [ccls](#ccls)
- [clangd](#clangd)
- [cssls](#cssls)
+- [dartls](#dartls)
- [dockerls](#dockerls)
- [elmls](#elmls)
- [flow](#flow)
@@ -216,6 +221,7 @@ that config.
- [julials](#julials)
- [leanls](#leanls)
- [metals](#metals)
+- [nimls](#nimls)
- [ocamlls](#ocamlls)
- [pyls](#pyls)
- [pyls_ms](#pyls_ms)
@@ -244,9 +250,7 @@ require'nvim_lsp'.bashls.setup{}
Default Values:
cmd = { "bash-language-server", "start" }
filetypes = { "sh" }
- log_level = 2
root_dir = vim's starting directory
- settings = {}
```
## ccls
@@ -662,10 +666,8 @@ require'nvim_lsp'.ccls.setup{}
capabilities = default capabilities, with offsetEncoding utf-8
cmd = { "ccls" }
filetypes = { "c", "cpp", "objc", "objcpp" }
- log_level = 2
on_init = function to handle changing offsetEncoding
root_dir = root_pattern("compile_commands.json", "compile_flags.txt", ".git")
- settings = {}
```
## clangd
@@ -685,10 +687,8 @@ require'nvim_lsp'.clangd.setup{}
capabilities = default capabilities, with offsetEncoding utf-8
cmd = { "clangd", "--background-index" }
filetypes = { "c", "cpp", "objc", "objcpp" }
- log_level = 2
on_init = function to handle changing offsetEncoding
root_dir = root_pattern("compile_commands.json", "compile_flags.txt", ".git") or dirname
- settings = {}
```
## cssls
@@ -709,7 +709,6 @@ require'nvim_lsp'.cssls.setup{}
capabilities = default capabilities, with offsetEncoding utf-8
cmd = { "css-languageserver", "--stdio" }
filetypes = { "css", "scss", "less" }
- log_level = 2
on_init = function to handle changing offsetEncoding
root_dir = root_pattern("package.json")
settings = {
@@ -725,6 +724,494 @@ require'nvim_lsp'.cssls.setup{}
}
```
+## dartls
+
+https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec
+
+Language server for dart.
+
+This server accepts configuration via the `settings` key.
+<details><summary>Available settings:</summary>
+
+- **`dart.additionalAnalyzerFileExtensions`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional file extensions that should be analyzed (usually used in combination with analyzer plugins).
+
+- **`dart.allowAnalytics`**: `boolean`
+
+ Default: `true`
+
+ Whether to send analytics such as startup timings, frequency of use of features and analysis server crashes.
+
+- **`dart.analysisExcludedFolders`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ An array of paths to be excluded from Dart analysis. This option should usually be set at the Workspace level.
+
+- **`dart.analysisServerFolding`**: `boolean`
+
+ Default: `true`
+
+ Whether to use folding data from the Dart analysis server instead of the built-in VS Code indent-based folding.
+
+- **`dart.analyzeAngularTemplates`**: `boolean`
+
+ Default: `true`
+
+ Whether to enable analysis for AngularDart templates (requires the angular_analyzer_plugin).
+
+- **`dart.analyzerAdditionalArgs`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional arguments to pass to the Dart analysis server.
+
+- **`dart.analyzerDiagnosticsPort`**: `null|number`
+
+ Default: `vim.NIL`
+
+ The port number to be used for the Dart analysis server diagnostic server.
+
+- **`dart.analyzerInstrumentationLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for very detailed logging in the Dart analysis server that may be useful when trying to diagnose analysis server issues.
+
+- **`dart.analyzerLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for communication between Dart Code and the analysis server.
+
+- **`dart.analyzerObservatoryPort`**: `null|number`
+
+ Default: `vim.NIL`
+
+ The port number to be used for the Dart analysis server observatory.
+
+- **`dart.analyzerPath`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a custom Dart analysis server.
+
+- **`dart.analyzerSshHost`**: `null|string`
+
+ Default: `vim.NIL`
+
+ An SSH host to run the analysis server.
+ This can be useful when modifying code on a remote machine using SSHFS.
+
+- **`dart.autoImportCompletions`**: `boolean`
+
+ Default: `true`
+
+ Whether to include symbols that have not been imported in the code completion list and automatically insert the required import when selecting them.
+
+- **`dart.buildRunnerAdditionalArgs`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional args to pass to the build_runner when building/watching/serving.
+
+- **`dart.checkForSdkUpdates`**: `boolean`
+
+ Default: `true`
+
+ Whether to check you are using the latest version of the Dart SDK at startup.
+
+- **`dart.closingLabels`**: `boolean`
+
+ Default: `true`
+
+ Whether to show annotations against constructor, method invocations and lists that span multiple lines.
+
+- **`dart.debugExternalLibraries`**: `boolean`
+
+ Whether to mark external pub package libraries as debuggable, enabling stepping into them while debugging.
+
+- **`dart.debugSdkLibraries`**: `boolean`
+
+ Whether to mark SDK libraries as debuggable, enabling stepping into them while debugging.
+
+- **`dart.devToolsLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a low-traffic log file for the Dart DevTools service.
+
+- **`dart.devToolsPort`**: `null|number`
+
+ Default: `vim.NIL`
+
+ The port number to be used for the Dart DevTools.
+
+- **`dart.devToolsReuseWindows`**: `boolean`
+
+ Default: `true`
+
+ Whether to try to reuse existing DevTools windows instead of launching new ones. Only works for instances of DevTools launched by the DevTools server on the local machine.
+
+- **`dart.devToolsTheme`**: `enum { "dark", "light" }`
+
+ Default: `"dark"`
+
+ The theme to use for Dart DevTools.
+
+- **`dart.doNotFormat`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ An array of glob patterns that should be excluded for formatting. The pattern is matched against the absolute path of the file. Use **/test/** to skip formatting for all test folders.
+
+- **`dart.enableCompletionCommitCharacters`**: `boolean`
+
+ Whether to automatically commit the selected completion item when pressing certain keys such as . , ( and [.
+
+- **`dart.enableSdkFormatter`**: `boolean`
+
+ Default: `true`
+
+ Whether to enable the dart_style formatter included with the Dart SDK.
+
+- **`dart.env`**: `object`
+
+ Default: `vim.empty_dict()`
+
+ Additional environment variables to be added to all Dart/Flutter processes spawned by the Dart and Flutter extensions.
+
+- **`dart.evaluateGettersInDebugViews`**: `boolean`
+
+ Default: `true`
+
+ Whether to evaluate getters in order to display them in debug views (such as the Variables, Watch and Hovers views).
+
+- **`dart.extensionLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a low-traffic log file for basic extension and editor issues.
+
+- **`dart.flutterAdbConnectOnChromeOs`**: `boolean`
+
+ Whether to automatically run 'adb connect 100.115.92.2:5555' when spawning the Flutter Daemon when running on Chrome OS.
+
+- **`dart.flutterAdditionalArgs`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional args to pass to all flutter commands.
+
+- **`dart.flutterAndroidX`**: `boolean`
+
+ Whether to pass the --androidx flag when running the 'Flutter: New Project' command.
+
+- **`dart.flutterCreateAndroidLanguage`**: `enum { "java", "kotlin" }`
+
+ Default: `"kotlin"`
+
+ The programming language to use for Android apps when creating new projects using the 'Flutter: New Project' command.
+
+- **`dart.flutterCreateIOSLanguage`**: `enum { "objc", "swift" }`
+
+ Default: `"swift"`
+
+ The programming language to use for IOS apps when creating new projects using the 'Flutter: New Project' command.
+
+- **`dart.flutterCreateOrganization`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The organization responsible for your new Flutter project, in reverse domain name notation. This string is used in Java package names and as prefix in the iOS bundle identifier when creating new projects using the 'Flutter: New Project' command.
+
+- **`dart.flutterDaemonLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for the 'flutter daemon' communication which is the service that provides information about connected devices used to show in the status bar.
+
+- **`dart.flutterGutterIcons`**: `boolean`
+
+ Default: `true`
+
+ Whether to show Flutter icons and colors in the editor gutter.
+
+- **`dart.flutterHotReloadOnSave`**: `boolean`
+
+ Default: `true`
+
+ Whether to automatically send a Hot Reload request during debug session when saving files.
+
+- **`dart.flutterHotRestartOnSave`**: `boolean`
+
+ Default: `true`
+
+ Whether to automatically send a Hot Restart request during a debug session when saving files if Hot Reload is not available but Hot Restart is.
+
+- **`dart.flutterOutline`**: `boolean`
+
+ Default: `true`
+
+ Whether to show the Flutter Outline tree in the side bar.
+
+- **`dart.flutterRunLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for 'flutter run' which is used to launch Flutter applications from VS Code. This is useful when trying to diagnose issues with applications launching (or failing to) on simulators and devices. Use ${name} in the log file name to prevent concurrent debug sessions overwriting each others logs.
+
+- **`dart.flutterScreenshotPath`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a directory to save Flutter screenshots.
+
+- **`dart.flutterSdkPath`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The location of the Flutter SDK to use. If blank, Dart Code will attempt to find it from the project folder, FLUTTER_ROOT environment variable and the PATH environment variable.
+
+- **`dart.flutterSdkPaths`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ An array of strings that are either Flutter SDKs or folders that contains multiple Flutter SDKs in sub-folders. When set, the version number in the status bar will be clickable to quickly switch between SDKs.
+
+- **`dart.flutterSelectDeviceWhenConnected`**: `boolean`
+
+ Default: `true`
+
+ Whether to set newly connected devices as the current device in Flutter projects.
+
+- **`dart.flutterStructuredErrors`**: `boolean`
+
+ Default: `true`
+
+ Whether to use Flutter's structured error support for improve error display.
+
+- **`dart.flutterTestLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for 'flutter test' which is used to run unit tests from VS Code. This is useful when trying to diagnose issues with unit test executions. Use ${name} in the log file name to prevent concurrent debug sessions overwriting each others logs.
+
+- **`dart.flutterTrackWidgetCreation`**: `boolean`
+
+ Default: `true`
+
+ Whether to pass --track-widget-creation to Flutter apps (required to support 'Inspect Widget'). This setting is always ignored when running in Profile or Release mode.
+
+- **`dart.insertArgumentPlaceholders`**: `boolean`
+
+ Default: `true`
+
+ Whether to insert argument placeholders during code completions. This feature is automatically disabled when enableCompletionCommitCharacters is enabled.
+
+- **`dart.lineLength`**: `integer`
+
+ Default: `80`
+
+ The maximum length of a line of code. This is used by the document formatter.
+
+- **`dart.maxLogLineLength`**: `number`
+
+ Default: `2000`
+
+ The maximum length of a line in the log file. Lines longer than this will be truncated and suffixed with an ellipsis.
+
+- **`dart.notifyAnalyzerErrors`**: `boolean`
+
+ Default: `true`
+
+ Whether to show a notification the first few times an analysis server exception occurs.
+
+- **`dart.observatoryLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for communication between Dart Code and Observatory (the VM debugger). This is useful when trying to diagnose issues with debugging such as missed breakpoints. Use ${name} in the log file name to prevent concurrent debug sessions overwriting each others logs.
+
+- **`dart.openDevTools`**: `enum { "never", "flutter", "always" }`
+
+ Default: `"never"`
+
+ Whether to automatically open DevTools at the start of a debug session.
+
+- **`dart.openTestView`**: `array`
+
+ Default: `{ "testRunStart" }`
+
+ Array items: `{enum = { "testRunStart", "testFailure" }}`
+
+ When to automatically switch focus to the test list (array to support multiple values).
+
+- **`dart.previewBuildRunnerTasks`**: `boolean`
+
+ Whether to register Pub Build Runner tasks with VS Code.
+
+- **`dart.previewFlutterUiGuides`**: `boolean`
+
+ Whether to enable the Flutter UI Guides preview.
+
+- **`dart.previewFlutterUiGuidesCustomTracking`**: `boolean`
+
+ Whether to enable custom tracking of Flutter UI guidelines (to hide some latency of waiting for the next Flutter Outline).
+
+- **`dart.previewHotReloadOnSaveWatcher`**: `boolean`
+
+ Whether to perform hot-reload-on-save based on a filesystem watcher for Dart files rather than using VS Code's onDidSave event. This allows reloads to trigger when external tools modify Dart source files.
+
+- **`dart.previewNewCompletionPlaceholders`**: `boolean`
+
+ Default: `true`
+
+ Whether to enable new behaviour for code completion to include @required arguments as placeholders (when using dart.insertArgumentPlaceholders).
+
+- **`dart.previewToStringInDebugViews`**: `boolean`
+
+ Whether to call toString() on objects when rendering them in debug views (such as the Variables, Watch and Hovers views). Only applies to views of 15 or fewer values for performance reasons.
+
+- **`dart.promptToGetPackages`**: `boolean`
+
+ Default: `true`
+
+ Whether to prompt to get packages when opening a project with out of date packages.
+
+- **`dart.promptToRunIfErrors`**: `boolean`
+
+ Default: `true`
+
+ Whether to prompt before running if there are errors in your project. Test scripts will be excluded from the check unless they're the script being run.
+
+- **`dart.pubAdditionalArgs`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional args to pass to all pub commands.
+
+- **`dart.pubTestLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for 'pub run test' runs. This is useful when trying to diagnose issues with unit test executions. Use ${name} in the log file name to prevent concurrent debug sessions overwriting each others logs.
+
+- **`dart.runPubGetOnPubspecChanges`**: `boolean`
+
+ Default: `true`
+
+ Whether to automatically run 'pub get' whenever pubspec.yaml is saved.
+
+- **`dart.sdkPath`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The location of the Dart SDK to use for analyzing and executing code. If blank, Dart Code will attempt to find it from the PATH environment variable. When editing a Flutter project, the version of Dart included in the Flutter SDK is used in preference.
+
+- **`dart.sdkPaths`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ An array of strings that are either Dart SDKs or folders that contains multiple Dart SDKs in sub-folders. When set, the version number in the status bar will be clickable to quickly switch between SDKs.
+
+- **`dart.showDartDeveloperLogs`**: `boolean`
+
+ Default: `true`
+
+ Whether to show logs from dart:developer's log() function in the debug console.
+
+- **`dart.showDartPadSampleCodeLens`**: `boolean`
+
+ Default: `true`
+
+ Whether to show CodeLens actions in the editor for opening online DartPad samples.
+
+- **`dart.showIgnoreQuickFixes`**: `boolean`
+
+ Whether to show quick fixes for ignoring hints and lints.
+
+- **`dart.showTestCodeLens`**: `boolean`
+
+ Default: `true`
+
+ Whether to show CodeLens actions in the editor for quick running/debugging tests.
+
+- **`dart.showTodos`**: `boolean`
+
+ Default: `true`
+
+ Whether to show TODOs in the Problems list.
+
+- **`dart.triggerSignatureHelpAutomatically`**: `boolean`
+
+ Whether to automatically trigger signature help when pressing keys such as , and (.
+
+- **`dart.useKnownChromeOSPorts`**: `boolean`
+
+ Default: `true`
+
+ Whether to use specific ports for Observatory and DevTools when running in Chrome OS. This is required to connect from the native Chrome OS browser but will prevent apps from launching if the ports are already in-use (for example if trying to run a second app).
+
+- **`dart.vmAdditionalArgs`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional args to pass to the Dart VM when running/debugging command line apps.
+
+- **`dart.warnWhenEditingFilesOutsideWorkspace`**: `boolean`
+
+ Default: `true`
+
+ Whether to show a warning when modifying files outside of the workspace.
+
+- **`dart.webDaemonLogFile`**: `null|string`
+
+ Default: `vim.NIL`
+
+ The path to a log file for communication between Dart Code and the webdev daemon. This is useful when trying to diagnose issues with launching web applications. Use ${name} in the log file name to prevent concurrent debug sessions overwriting each others logs.
+
+</details>
+
+```lua
+require'nvim_lsp'.dartls.setup{}
+
+ Default Values:
+ cmd = { "dart", "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot", "--lsp" }
+ filetypes = { "dart" }
+ init_options = {
+ closingLabels = "true",
+ fluttreOutline = "false",
+ onlyAnalyzeProjectsWithOpenFiles = "false",
+ outline = "true",
+ suggestFromUnimportedLibraries = "true"
+ }
+ root_dir = root_pattern("pubspec.yaml")
+```
+
## dockerls
https://github.com/rcjsuen/dockerfile-language-server-nodejs
@@ -742,9 +1229,7 @@ require'nvim_lsp'.dockerls.setup{}
Default Values:
cmd = { "docker-langserver", "--stdio" }
filetypes = { "Dockerfile", "dockerfile" }
- log_level = 2
root_dir = root_pattern("Dockerfile")
- settings = {}
```
## elmls
@@ -805,10 +1290,8 @@ require'nvim_lsp'.elmls.setup{}
elmPath = "elm",
elmTestPath = "elm-test"
}
- log_level = 2
on_init = function to handle changing offsetEncoding
root_dir = root_pattern("elm.json")
- settings = {}
```
## flow
@@ -930,9 +1413,7 @@ require'nvim_lsp'.flow.setup{}
Default Values:
cmd = { "npm", "run", "flow", "lsp" }
filetypes = { "javascript", "javascriptreact", "javascript.jsx" }
- log_level = 2
root_dir = root_pattern(".flowconfig")
- settings = {}
```
## fortls
@@ -1018,7 +1499,6 @@ require'nvim_lsp'.fortls.setup{}
Default Values:
cmd = { "fortls" }
filetypes = { "fortran" }
- log_level = 2
root_dir = root_pattern(".fortls")
settings = {
nthreads = 1
@@ -1054,9 +1534,7 @@ require'nvim_lsp'.ghcide.setup{}
Default Values:
cmd = { "ghcide", "--lsp" }
filetypes = { "haskell", "lhaskell" }
- log_level = 2
root_dir = root_pattern("stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml")
- settings = {}
```
## gopls
@@ -1072,9 +1550,7 @@ require'nvim_lsp'.gopls.setup{}
Default Values:
cmd = { "gopls" }
filetypes = { "go" }
- log_level = 2
root_dir = root_pattern("go.mod", ".git")
- settings = {}
```
## hie
@@ -1199,9 +1675,7 @@ require'nvim_lsp'.hie.setup{}
Default Values:
cmd = { "hie-wrapper" }
filetypes = { "haskell" }
- log_level = 2
root_dir = root_pattern("stack.yaml", "package.yaml", ".git")
- settings = {}
```
## intelephense
@@ -1222,7 +1696,6 @@ require'nvim_lsp'.intelephense.setup{}
capabilities = default capabilities, with offsetEncoding utf-8
cmd = { "intelephense", "--stdio" }
filetypes = { "php" }
- log_level = 2
on_init = function to handle changing offsetEncoding
root_dir = root_pattern("composer.json", ".git")
```
@@ -1321,10 +1794,8 @@ require'nvim_lsp'.jsonls.setup{}
}
cmd = { "vscode-json-languageserver", "--stdio" }
filetypes = { "json" }
- log_level = 2
on_init = <function 1>
root_dir = root_pattern(".git", vim.fn.getcwd())
- settings = {}
```
## julials
@@ -1461,9 +1932,7 @@ require'nvim_lsp'.julials.setup{}
Default Values:
cmd = { "julia", "--project", "--startup-file=no", "--history-file=no", "-e", " using LanguageServer;\n using Pkg;\n server = LanguageServer.LanguageServerInstance(stdin, stdout, false, dirname(Pkg.Types.Context().env.project_file));\n server.runlinter = true; run(server);\n " }
filetypes = { "julia" }
- log_level = 2
root_dir = <function 1>
- settings = {}
```
## leanls
@@ -1605,9 +2074,7 @@ require'nvim_lsp'.leanls.setup{}
Default Values:
cmd = { "lean-language-server", "--stdio" }
filetypes = { "lean" }
- log_level = 2
root_dir = util.root_pattern(".git")
- settings = {}
```
## metals
@@ -1665,9 +2132,80 @@ require'nvim_lsp'.metals.setup{}
Default Values:
cmd = { "metals" }
filetype = { "scala" }
- log_level = 2
root_dir = util.root_pattern("build.sbt")
- settings = {}
+```
+
+## nimls
+
+https://github.com/PMunch/nimlsp
+`nimlsp` can be installed via `:LspInstall nimls` or by yourself the `nimble` package manager:
+```sh
+nimble install nimlsp
+```
+
+Can be installed in Nvim with `:LspInstall nimls`
+This server accepts configuration via the `settings` key.
+<details><summary>Available settings:</summary>
+
+- **`nim.buildCommand`**: `string`
+
+ Default: `"c"`
+
+ Nim build command (c, cpp, doc, etc)
+
+- **`nim.buildOnSave`**: `boolean`
+
+ Execute build task from tasks.json file on save.
+
+- **`nim.licenseString`**: `string`
+
+ Default: `""`
+
+ Optional license text that will be inserted on nim file creation.
+
+- **`nim.lintOnSave`**: `boolean`
+
+ Default: `true`
+
+ Check code by using 'nim check' on save.
+
+- **`nim.logNimsuggest`**: `boolean`
+
+ Enable verbose logging of nimsuggest to use profile directory.
+
+- **`nim.nimsuggestRestartTimeout`**: `integer`
+
+ Default: `60`
+
+ Nimsuggest will be restarted after this timeout in minutes, if 0 then restart disabled.
+
+- **`nim.project`**: `array`
+
+ Default: `{}`
+
+ Nim project file, if empty use current selected.
+
+- **`nim.runOutputDirectory`**: `string`
+
+ Default: `""`
+
+ Output directory for run selected file command. The directory is relative to the workspace root.
+
+- **`nim.test-project`**: `string`
+
+ Default: `""`
+
+ Optional test project.
+
+</details>
+
+```lua
+require'nvim_lsp'.nimls.setup{}
+
+ Default Values:
+ cmd = { "nimlsp" }
+ filetypes = { "nim" }
+ root_dir = root_pattern(".git") or os_homedir
```
## ocamlls
@@ -1687,9 +2225,7 @@ require'nvim_lsp'.ocamlls.setup{}
Default Values:
cmd = { "ocaml-language-server", "--stdio" }
filetypes = { "ocaml", "reason" }
- log_level = 2
root_dir = root_pattern(".merlin", "package.json")
- settings = {}
```
## pyls
@@ -1969,9 +2505,7 @@ require'nvim_lsp'.pyls.setup{}
Default Values:
cmd = { "pyls" }
filetypes = { "python" }
- log_level = 2
root_dir = vim's starting directory
- settings = {}
```
## pyls_ms
@@ -2007,7 +2541,6 @@ require'nvim_lsp'.pyls_ms.setup{}
}
}
}
- log_level = 2
on_new_config = <function 1>
root_dir = vim's starting directory
settings = {
@@ -2244,9 +2777,7 @@ require'nvim_lsp'.rls.setup{}
Default Values:
cmd = { "rls" }
filetypes = { "rust" }
- log_level = 2
root_dir = root_pattern("Cargo.toml")
- settings = {}
```
## rust_analyzer
@@ -2270,6 +2801,8 @@ This server accepts configuration via the `settings` key.
Default: `{}`
+ Array items: `{type = "string"}`
+
`cargo-watch` arguments. (e.g: `--features="shumway,pdf"` will run as `cargo watch -x "check --features="shumway,pdf""` )
- **`rust-analyzer.cargo-watch.command`**: `string`
@@ -2294,6 +2827,8 @@ This server accepts configuration via the `settings` key.
Default: `{}`
+ Array items: `{type = "string"}`
+
List of features to activate
- **`rust-analyzer.cargoFeatures.noDefaultFeatures`**: `boolean`
@@ -2310,6 +2845,8 @@ This server accepts configuration via the `settings` key.
Default: `{}`
+ Array items: `{type = "string"}`
+
Paths to exclude from analysis
- **`rust-analyzer.featureFlags`**: `object`
@@ -2322,33 +2859,45 @@ This server accepts configuration via the `settings` key.
Highlight Rust code (overrides built-in syntax highlighting)
-- **`rust-analyzer.lruCapacity`**: `number|null`
+- **`rust-analyzer.lruCapacity`**: `null|integer`
Default: `vim.NIL`
Number of syntax trees rust-analyzer keeps in memory
-- **`rust-analyzer.maxInlayHintLength`**: `number`
+- **`rust-analyzer.maxInlayHintLength`**: `null|integer`
Default: `20`
Maximum length for inlay hints
-- **`rust-analyzer.raLspServerPath`**: `null|string`
+- **`rust-analyzer.rainbowHighlightingOn`**: `boolean`
+
+ When highlighting Rust code, use a unique color per identifier
+
+- **`rust-analyzer.rustfmtArgs`**: `array`
+
+ Default: `{}`
+
+ Array items: `{type = "string"}`
+
+ Additional arguments to rustfmt
+
+- **`rust-analyzer.serverPath`**: `null|string`
Default: `vim.NIL`
- Path to ra_lsp_server executable (points to bundled binary by default)
+ Path to rust-analyzer executable (points to bundled binary by default)
-- **`rust-analyzer.rainbowHighlightingOn`**: `boolean`
+- **`rust-analyzer.trace.extension`**: `boolean`
- When highlighting Rust code, use a unique color per identifier
+ Enable logging of VS Code extensions itself
- **`rust-analyzer.trace.server`**: `enum { "off", "messages", "verbose" }`
Default: `"off"`
- Trace requests to the ra_lsp_server
+ Trace requests to the rust-analyzer
- **`rust-analyzer.useClientWatching`**: `boolean`
@@ -2403,12 +2952,10 @@ require'nvim_lsp'.rust_analyzer.setup{}
}
}
}
- cmd = { "ra_lsp_server" }
+ cmd = { "rust-analyzer" }
filetypes = { "rust" }
- log_level = 2
on_init = <function 1>
root_dir = root_pattern("Cargo.toml")
- settings = {}
```
## solargraph
@@ -2528,9 +3075,7 @@ require'nvim_lsp'.solargraph.setup{}
Default Values:
cmd = { "solargraph", "stdio" }
filetypes = { "ruby" }
- log_level = 2
root_dir = root_pattern("Gemfile", ".git")
- settings = {}
```
## sumneko_lua
@@ -2635,7 +3180,6 @@ require'nvim_lsp'.sumneko_lua.setup{}
filetypes = { "lua" }
log_level = 2
root_dir = root_pattern(".git") or os_homedir
- settings = {}
```
## terraformls
@@ -2716,9 +3260,7 @@ require'nvim_lsp'.terraformls.setup{}
Default Values:
cmd = { "terraform-lsp" }
filetypes = { "terraform" }
- log_level = 2
root_dir = root_pattern(".git")
- settings = {}
```
## texlab
@@ -2739,7 +3281,6 @@ require'nvim_lsp'.texlab.setup{}
Default Values:
cmd = { "texlab" }
filetypes = { "tex", "bib" }
- log_level = 2
root_dir = vim's starting directory
settings = {
bibtex = {
@@ -2782,10 +3323,8 @@ require'nvim_lsp'.tsserver.setup{}
capabilities = default capabilities, with offsetEncoding utf-8
cmd = { "typescript-language-server", "--stdio" }
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
- log_level = 2
on_init = function to handle changing offsetEncoding
root_dir = root_pattern("package.json")
- settings = {}
```
## vimls
@@ -2818,10 +3357,8 @@ require'nvim_lsp'.vimls.setup{}
},
vimruntime = ""
}
- log_level = 2
on_new_config = <function 1>
root_dir = <function 1>
- settings = {}
```
## vuels
@@ -3068,7 +3605,6 @@ require'nvim_lsp'.vuels.setup{}
}
}
}
- log_level = 2
root_dir = root_pattern("package.json", "vue.config.js")
```
@@ -3204,9 +3740,7 @@ require'nvim_lsp'.yamlls.setup{}
}
cmd = { "yaml-language-server", "--stdio" }
filetypes = { "yaml" }
- log_level = 2
on_init = <function 1>
root_dir = root_pattern(".git", vim.fn.getcwd())
- settings = {}
```
diff --git a/lua/nvim_lsp/bashls.lua b/lua/nvim_lsp/bashls.lua
index a8041d3c..f8d00e9e 100644
--- a/lua/nvim_lsp/bashls.lua
+++ b/lua/nvim_lsp/bashls.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "bashls"
local bin_name = "bash-language-server"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = {"bash-language-server", "start"};
filetypes = {"sh"};
root_dir = vim.loop.os_homedir;
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/lua/nvim_lsp/ccls.lua b/lua/nvim_lsp/ccls.lua
index 3b0293f3..4accfc98 100644
--- a/lua/nvim_lsp/ccls.lua
+++ b/lua/nvim_lsp/ccls.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.ccls = {
default_config = util.utf8_config {
cmd = {"ccls"};
filetypes = {"c", "cpp", "objc", "objcpp"};
root_dir = util.root_pattern("compile_commands.json", "compile_flags.txt", ".git");
- log_level = lsp.protocol.MessageType.Warning;
};
-- commands = {};
-- on_new_config = function(new_config) end;
diff --git a/lua/nvim_lsp/clangd.lua b/lua/nvim_lsp/clangd.lua
index 9196e721..59649f8e 100644
--- a/lua/nvim_lsp/clangd.lua
+++ b/lua/nvim_lsp/clangd.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local root_pattern = util.root_pattern("compile_commands.json", "compile_flags.txt", ".git")
configs.clangd = {
@@ -10,7 +9,6 @@ configs.clangd = {
root_dir = function(fname)
return root_pattern(fname) or util.path.dirname(fname)
end;
- log_level = lsp.protocol.MessageType.Warning;
};
-- commands = {};
-- on_new_config = function(new_config) end;
diff --git a/lua/nvim_lsp/configs.lua b/lua/nvim_lsp/configs.lua
index b2105b75..3d64a988 100644
--- a/lua/nvim_lsp/configs.lua
+++ b/lua/nvim_lsp/configs.lua
@@ -4,7 +4,6 @@ local tbl_extend = vim.tbl_extend
local configs = {}
-
function configs.__newindex(t, config_name, config_def)
validate {
name = {config_name, 's'};
@@ -26,6 +25,7 @@ function configs.__newindex(t, config_name, config_def)
local default_config = tbl_extend("keep", config_def.default_config, {
log_level = lsp.protocol.MessageType.Warning;
+ message_level = lsp.protocol.MessageType.Warning;
settings = vim.empty_dict();
init_options = vim.empty_dict();
callbacks = {};
@@ -42,7 +42,17 @@ function configs.__newindex(t, config_name, config_def)
if params and params.type <= config.log_level then
-- TODO(ashkan) remove this after things have settled.
assert(lsp.callbacks, "Update to Nvim HEAD. This is an incompatible interface.")
- lsp.callbacks[method](err, method, params, client_id)
+ assert(lsp.callbacks["window/logMessage"], "Callback for window/logMessage notification is not defined")
+ lsp.callbacks["window/logMessage"](err, method, params, client_id)
+ end
+ end
+
+ config.callbacks["window/showMessage"] = function(err, method, params, client_id)
+ if params and params.type <= config.message_level then
+ -- TODO(ashkan) remove this after things have settled.
+ assert(lsp.callbacks and lsp.callbacks[method], "Update to Nvim HEAD. This is an incompatible interface.")
+ assert(lsp.callbacks["window/showMessage"], "Callback for window/showMessage notification is not defined")
+ lsp.callbacks["window/showMessage"](err, method, params, client_id)
end
end
diff --git a/lua/nvim_lsp/cssls.lua b/lua/nvim_lsp/cssls.lua
index fa6b29cf..c096440a 100644
--- a/lua/nvim_lsp/cssls.lua
+++ b/lua/nvim_lsp/cssls.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "cssls"
local bin_name = "css-languageserver"
@@ -20,7 +19,6 @@ configs[server_name] = {
root_dir = function(fname)
return root_pattern(fname) or vim.loop.os_homedir()
end;
- log_level = lsp.protocol.MessageType.Warning;
settings = {
css = { validate = true },
scss = { validate = true },
diff --git a/lua/nvim_lsp/dartls.lua b/lua/nvim_lsp/dartls.lua
index e9393728..01581a13 100644
--- a/lua/nvim_lsp/dartls.lua
+++ b/lua/nvim_lsp/dartls.lua
@@ -1,6 +1,5 @@
local nvim_lsp = require 'nvim_lsp'
local configs = require 'nvim_lsp/configs'
-local lsp = vim.lsp
local server_name = "dartls"
local bin_name = "dart"
@@ -39,7 +38,6 @@ configs[server_name] = {
cmd = {bin_name, analysis_server_snapshot_path(), "--lsp"};
filetypes = {"dart"};
root_dir = nvim_lsp.util.root_pattern("pubspec.yaml");
- log_level = lsp.protocol.MessageType.Warning;
init_options = {
onlyAnalyzeProjectsWithOpenFiles = "false",
suggestFromUnimportedLibraries = "true",
diff --git a/lua/nvim_lsp/dockerls.lua b/lua/nvim_lsp/dockerls.lua
index 358d83e5..941d2c84 100644
--- a/lua/nvim_lsp/dockerls.lua
+++ b/lua/nvim_lsp/dockerls.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "dockerls"
local bin_name = "docker-langserver"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = {bin_name, "--stdio"};
filetypes = {"Dockerfile", "dockerfile"};
root_dir = util.root_pattern("Dockerfile");
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/lua/nvim_lsp/elmls.lua b/lua/nvim_lsp/elmls.lua
index c89cc324..827614f5 100644
--- a/lua/nvim_lsp/elmls.lua
+++ b/lua/nvim_lsp/elmls.lua
@@ -27,7 +27,6 @@ configs[server_name] = {
return elm_root_pattern(fname)
end
end;
- log_level = lsp.protocol.MessageType.Warning;
init_options = {
elmPath = "elm",
elmFormatPath = "elm-format",
diff --git a/lua/nvim_lsp/flow.lua b/lua/nvim_lsp/flow.lua
index b8bb0323..cde064ac 100644
--- a/lua/nvim_lsp/flow.lua
+++ b/lua/nvim_lsp/flow.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.flow = {
default_config = {
cmd = {"npm", "run", "flow","lsp"};
filetypes = {"javascript", "javascriptreact", "javascript.jsx"};
root_dir = util.root_pattern(".flowconfig");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
package_json = "https://raw.githubusercontent.com/flowtype/flow-for-vscode/master/package.json";
diff --git a/lua/nvim_lsp/fortls.lua b/lua/nvim_lsp/fortls.lua
index d0b19f29..5eceb00c 100644
--- a/lua/nvim_lsp/fortls.lua
+++ b/lua/nvim_lsp/fortls.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.fortls = {
default_config = {
cmd = {"fortls"};
filetypes = {"fortran"};
root_dir = util.root_pattern(".fortls");
- log_level = lsp.protocol.MessageType.Warning;
settings = {
nthreads = 1,
};
diff --git a/lua/nvim_lsp/ghcide.lua b/lua/nvim_lsp/ghcide.lua
index a07ebfa9..5ec8d583 100644
--- a/lua/nvim_lsp/ghcide.lua
+++ b/lua/nvim_lsp/ghcide.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.ghcide = {
default_config = {
cmd = { "ghcide", "--lsp" };
filetypes = { "haskell", "lhaskell" };
root_dir = util.root_pattern("stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
diff --git a/lua/nvim_lsp/gopls.lua b/lua/nvim_lsp/gopls.lua
index 2052b8ca..d853232a 100644
--- a/lua/nvim_lsp/gopls.lua
+++ b/lua/nvim_lsp/gopls.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.gopls = {
default_config = {
cmd = {"gopls"};
filetypes = {"go"};
root_dir = util.root_pattern("go.mod", ".git");
- log_level = lsp.protocol.MessageType.Warning;
};
-- on_new_config = function(new_config) end;
-- on_attach = function(client, bufnr) end;
diff --git a/lua/nvim_lsp/hie.lua b/lua/nvim_lsp/hie.lua
index 312f1af3..f80789d6 100644
--- a/lua/nvim_lsp/hie.lua
+++ b/lua/nvim_lsp/hie.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.hie = {
default_config = {
cmd = {"hie-wrapper"};
filetypes = {"haskell"};
root_dir = util.root_pattern("stack.yaml", "package.yaml", ".git");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
diff --git a/lua/nvim_lsp/intelephense.lua b/lua/nvim_lsp/intelephense.lua
index 8cdb5573..2e5416ff 100644
--- a/lua/nvim_lsp/intelephense.lua
+++ b/lua/nvim_lsp/intelephense.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "intelephense"
local bin_name = "intelephense"
@@ -22,7 +21,6 @@ configs[server_name] = {
-- prefer cwd if root is a descendant
return util.path.is_descendant(cwd, root) and cwd or root;
end;
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/lua/nvim_lsp/jsonls.lua b/lua/nvim_lsp/jsonls.lua
index 5481b32e..940d608a 100644
--- a/lua/nvim_lsp/jsonls.lua
+++ b/lua/nvim_lsp/jsonls.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "jsonls"
local bin_name = "vscode-json-languageserver"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = {bin_name, "--stdio"};
filetypes = {"json"};
root_dir = util.root_pattern(".git", vim.fn.getcwd());
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/lua/nvim_lsp/julials.lua b/lua/nvim_lsp/julials.lua
index 16cc83c6..a5a96637 100644
--- a/lua/nvim_lsp/julials.lua
+++ b/lua/nvim_lsp/julials.lua
@@ -12,7 +12,6 @@ configs.julials = {
]]
};
filetypes = {'julia'};
- log_level = vim.lsp.protocol.MessageType.Warning;
root_dir = function(fname)
return util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
diff --git a/lua/nvim_lsp/leanls.lua b/lua/nvim_lsp/leanls.lua
index 0efc305c..0582868e 100644
--- a/lua/nvim_lsp/leanls.lua
+++ b/lua/nvim_lsp/leanls.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.leanls = {
default_config = {
cmd = {"lean-language-server", "--stdio"};
filetypes = {"lean"};
root_dir = util.root_pattern(".git");
- log_level = lsp.protocol.MessageType.Warning;
};
-- on_new_config = function(new_config) end;
-- on_attach = function(client, bufnr) end;
diff --git a/lua/nvim_lsp/metals.lua b/lua/nvim_lsp/metals.lua
index 1c3c7e2e..2c06f06a 100644
--- a/lua/nvim_lsp/metals.lua
+++ b/lua/nvim_lsp/metals.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "metals"
local bin_name = "metals"
@@ -53,7 +52,6 @@ configs[server_name] = {
cmd = {bin_name};
filetype = {"scala"};
root_dir = util.root_pattern("build.sbt", "build.sc", "build.gradle", "pom.xml");
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(config)
installer.configure(config)
diff --git a/lua/nvim_lsp/nimls.lua b/lua/nvim_lsp/nimls.lua
index f4eb2e1e..2e10eb97 100644
--- a/lua/nvim_lsp/nimls.lua
+++ b/lua/nvim_lsp/nimls.lua
@@ -5,7 +5,6 @@ configs.nimls = {
default_config = {
cmd = {"nimlsp",};
filetypes = {'nim'};
- log_level = vim.lsp.protocol.MessageType.Warning;
root_dir = function(fname)
return util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
diff --git a/lua/nvim_lsp/ocamlls.lua b/lua/nvim_lsp/ocamlls.lua
index 4477a68a..417529fa 100644
--- a/lua/nvim_lsp/ocamlls.lua
+++ b/lua/nvim_lsp/ocamlls.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "ocamlls"
local bin_name = "ocaml-language-server"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = { bin_name, "--stdio" };
filetypes = { "ocaml", "reason" };
root_dir = util.root_pattern(".merlin", "package.json");
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/lua/nvim_lsp/pyls.lua b/lua/nvim_lsp/pyls.lua
index 17f7978a..defce25b 100644
--- a/lua/nvim_lsp/pyls.lua
+++ b/lua/nvim_lsp/pyls.lua
@@ -1,12 +1,13 @@
local configs = require 'nvim_lsp/configs'
-local lsp = vim.lsp
+local util = require 'nvim_lsp/util'
configs.pyls = {
default_config = {
cmd = {"pyls"};
filetypes = {"python"};
- root_dir = vim.loop.os_homedir;
- log_level = lsp.protocol.MessageType.Warning;
+ root_dir = function(fname)
+ return util.path.dirname(fname)
+ end;
};
-- on_new_config = function(new_config) end;
-- on_attach = function(client, bufnr) end;
diff --git a/lua/nvim_lsp/pyls_ms.lua b/lua/nvim_lsp/pyls_ms.lua
index 16b7dd7e..55f3da06 100644
--- a/lua/nvim_lsp/pyls_ms.lua
+++ b/lua/nvim_lsp/pyls_ms.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local name = "pyls_ms"
@@ -83,7 +82,6 @@ configs[name] = {
root_dir = function(fname)
return util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
- log_level = lsp.protocol.MessageType.Warning;
settings = {
python = {
analysis = {
diff --git a/lua/nvim_lsp/rls.lua b/lua/nvim_lsp/rls.lua
index bd47db4c..472ea3d1 100644
--- a/lua/nvim_lsp/rls.lua
+++ b/lua/nvim_lsp/rls.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.rls = {
default_config = {
cmd = {"rls"};
filetypes = {"rust"};
root_dir = util.root_pattern("Cargo.toml");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
vscode = "rust-lang.rust";
diff --git a/lua/nvim_lsp/rust_analyzer.lua b/lua/nvim_lsp/rust_analyzer.lua
index 37ddbc02..234a3819 100644
--- a/lua/nvim_lsp/rust_analyzer.lua
+++ b/lua/nvim_lsp/rust_analyzer.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.rust_analyzer = {
default_config = util.utf8_config {
cmd = {"rust-analyzer"};
filetypes = {"rust"};
root_dir = util.root_pattern("Cargo.toml");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
package_json = "https://github.com/rust-analyzer/rust-analyzer/raw/master/editors/code/package.json";
diff --git a/lua/nvim_lsp/solargraph.lua b/lua/nvim_lsp/solargraph.lua
index d658102b..51de52ce 100644
--- a/lua/nvim_lsp/solargraph.lua
+++ b/lua/nvim_lsp/solargraph.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.solargraph = {
default_config = {
cmd = {"solargraph", "stdio"};
filetypes = {"ruby"};
root_dir = util.root_pattern("Gemfile", ".git");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
vscode = "castwide.solargraph";
diff --git a/lua/nvim_lsp/sumneko_lua.lua b/lua/nvim_lsp/sumneko_lua.lua
index e0610fb4..f88c61c8 100644
--- a/lua/nvim_lsp/sumneko_lua.lua
+++ b/lua/nvim_lsp/sumneko_lua.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local vim = vim
local name = "sumneko_lua"
local bin_name = "lua-language-server"
diff --git a/lua/nvim_lsp/terraformls.lua b/lua/nvim_lsp/terraformls.lua
index cd918141..0a84fe2d 100644
--- a/lua/nvim_lsp/terraformls.lua
+++ b/lua/nvim_lsp/terraformls.lua
@@ -1,13 +1,11 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
configs.terraformls = {
default_config = {
cmd = {"terraform-lsp"};
filetypes = {"terraform"};
root_dir = util.root_pattern(".git");
- log_level = lsp.protocol.MessageType.Warning;
};
docs = {
vscode = "mauve.terraform";
diff --git a/lua/nvim_lsp/texlab.lua b/lua/nvim_lsp/texlab.lua
index 37021ee6..374666fc 100644
--- a/lua/nvim_lsp/texlab.lua
+++ b/lua/nvim_lsp/texlab.lua
@@ -36,7 +36,6 @@ configs.texlab = {
cmd = {"texlab"};
filetypes = {"tex", "bib"};
root_dir = vim.loop.os_homedir;
- log_level = lsp.protocol.MessageType.Warning;
settings = {
latex = {
build = {
diff --git a/lua/nvim_lsp/tsserver.lua b/lua/nvim_lsp/tsserver.lua
index 8b8e0bcc..8bb79d79 100644
--- a/lua/nvim_lsp/tsserver.lua
+++ b/lua/nvim_lsp/tsserver.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "tsserver"
local bin_name = "typescript-language-server"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = {bin_name, "--stdio"};
filetypes = {"javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx"};
root_dir = util.root_pattern("package.json");
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/lua/nvim_lsp/vimls.lua b/lua/nvim_lsp/vimls.lua
index 724588aa..88839699 100644
--- a/lua/nvim_lsp/vimls.lua
+++ b/lua/nvim_lsp/vimls.lua
@@ -1,6 +1,5 @@
local configs = require "nvim_lsp/configs"
local util = require "nvim_lsp/util"
-local lsp = vim.lsp
local server_name = "vimls"
local bin_name = "vim-language-server"
@@ -18,7 +17,6 @@ configs[server_name] = {
root_dir = function(fname)
return util.find_git_ancestor(fname) or vim.loop.os_homedir()
end,
- log_level = lsp.protocol.MessageType.Warning,
init_options = {
iskeyword = "@,48-57,_,192-255,-#",
vimruntime = "",
diff --git a/lua/nvim_lsp/vuels.lua b/lua/nvim_lsp/vuels.lua
index bd14d83d..3972bcbb 100644
--- a/lua/nvim_lsp/vuels.lua
+++ b/lua/nvim_lsp/vuels.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "vuels"
local bin_name = "vls"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = {bin_name};
filetypes = {"vue"};
root_dir = util.root_pattern("package.json", "vue.config.js");
- log_level = lsp.protocol.MessageType.Warning;
init_options = {
config = {
vetur = {
diff --git a/lua/nvim_lsp/yamlls.lua b/lua/nvim_lsp/yamlls.lua
index 3795a80b..5b1c9f82 100644
--- a/lua/nvim_lsp/yamlls.lua
+++ b/lua/nvim_lsp/yamlls.lua
@@ -1,6 +1,5 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
-local lsp = vim.lsp
local server_name = "yamlls"
local bin_name = "yaml-language-server"
@@ -16,7 +15,6 @@ configs[server_name] = {
cmd = {bin_name, "--stdio"};
filetypes = {"yaml"};
root_dir = util.root_pattern(".git", vim.fn.getcwd());
- log_level = lsp.protocol.MessageType.Warning;
};
on_new_config = function(new_config)
local install_info = installer.info()
diff --git a/scripts/README_template.md b/scripts/README_template.md
index 98c9aa4e..4d925d94 100644
--- a/scripts/README_template.md
+++ b/scripts/README_template.md
@@ -76,6 +76,7 @@ local nvim_lsp = require'nvim_lsp'
nvim_lsp.texlab.setup{
name = 'texlab_fancy';
log_level = vim.lsp.protocol.MessageType.Log;
+ message_level = vim.lsp.protocol.MessageType.Log;
settings = {
latex = {
build = {
@@ -106,7 +107,6 @@ if not nvim_lsp.foo_lsp then
root_dir = function(fname)
return nvim_lsp.util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
- log_level = vim.lsp.protocol.MessageType.Warning;
settings = {};
};
}
@@ -168,8 +168,12 @@ nvim_lsp.SERVER.setup{config}
Server may specify a default value.
{log_level}
- controls the level of logs to show from build processes and other
- window/logMessage events. Defaults to
+ controls the level of logs to show from window/logMessage notifications. Defaults to
+ vim.lsp.protocol.MessageType.Warning instead of
+ vim.lsp.protocol.MessageType.Log.
+
+ {message_level}
+ controls the level of messages to show from window/showMessage notifications. Defaults to
vim.lsp.protocol.MessageType.Warning instead of
vim.lsp.protocol.MessageType.Log.