summaryrefslogtreecommitdiff
path: root/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/dartls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'start/lspconfig-0.1.8/lua/lspconfig/server_configurations/dartls.lua')
-rw-r--r--start/lspconfig-0.1.8/lua/lspconfig/server_configurations/dartls.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/dartls.lua b/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/dartls.lua
new file mode 100644
index 0000000..83eda99
--- /dev/null
+++ b/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/dartls.lua
@@ -0,0 +1,32 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'dart', 'language-server', '--protocol=lsp' },
+ filetypes = { 'dart' },
+ root_dir = util.root_pattern 'pubspec.yaml',
+ init_options = {
+ onlyAnalyzeProjectsWithOpenFiles = true,
+ suggestFromUnimportedLibraries = true,
+ closingLabels = true,
+ outline = true,
+ flutterOutline = true,
+ },
+ settings = {
+ dart = {
+ completeFunctionCalls = true,
+ showTodos = true,
+ },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec
+
+Language server for dart.
+]],
+ default_config = {
+ root_dir = [[root_pattern("pubspec.yaml")]],
+ },
+ },
+}