Merge pull request #51 from FlafyDev/dart-fixes

Dart fixes
This commit is contained in:
NotAShelf 2023-04-18 17:46:38 +03:00 committed by GitHub
commit f3aac8cb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -12,10 +12,10 @@ with builtins; let
dart = {
package = pkgs.dart;
lspConfig = ''
lspconfig.dart.setup{
lspconfig.dartls.setup{
capabilities = capabilities;
on_attach=default_on_attach;
cmd = {"${pkgs.dart}/bin/dart"};
cmd = {"${pkgs.dart}/bin/dart", "language-server", "--protocol=lsp"};
${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"}
}
'';

View file

@ -12,10 +12,10 @@ with builtins; let
dart = {
package = pkgs.dart;
lspConfig = ''
lspconfig.dart.setup{
lspconfig.dartls.setup{
capabilities = capabilities;
on_attach=default_on_attach;
cmd = {"${pkgs.dart}/bin/dart"};
cmd = {"${pkgs.dart}/bin/dart", "language-server", "--protocol=lsp"};
${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"}
}
'';
@ -35,11 +35,7 @@ in {
};
lsp = {
enable = mkOption {
description = "Enable Dart LSP support";
type = types.bool;
default = config.vim.languages.enableLSP;
};
enable = mkEnableOption "Enable Dart LSP support";
server = mkOption {
description = "The Dart LSP server to use";
type = with types; enum (attrNames servers);
@ -58,7 +54,11 @@ in {
};
flutter-tools = {
enable = mkEnableOption "Enable flutter-tools for flutter support";
enable = mkOption {
description = "Enable flutter-tools for flutter support";
type = types.bool;
default = config.vim.languages.enableLSP;
};
color = {
enable = mkEnableOption "Whether or mot to highlight color variables at all";