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 = { dart = {
package = pkgs.dart; package = pkgs.dart;
lspConfig = '' lspConfig = ''
lspconfig.dart.setup{ lspconfig.dartls.setup{
capabilities = capabilities; capabilities = capabilities;
on_attach=default_on_attach; 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}"} ${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"}
} }
''; '';

View file

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