diff options
author | azahi <azat@bahawi.net> | 2025-03-12 20:17:13 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2025-03-12 20:17:13 +0300 |
commit | c81dc5a13b469c511fac6fa2390b70422d1b4da5 (patch) | |
tree | 4dab5909006ab5c25da6bd9fde6a714c7719ded7 /modules/vscode.nix | |
parent | 2025-02-17 (diff) |
Diffstat (limited to '')
-rw-r--r-- | modules/vscode.nix | 303 |
1 files changed, 140 insertions, 163 deletions
diff --git a/modules/vscode.nix b/modules/vscode.nix index 0eebdda..2383409 100644 --- a/modules/vscode.nix +++ b/modules/vscode.nix @@ -45,192 +45,169 @@ in inherit (cfg) package; - extensions = - with pkgs.open-vsx; - [ - editorconfig.editorconfig - efoerster.texlab - github.vscode-pull-request-github - golang.go - graphql.vscode-graphql - graphql.vscode-graphql-execution - graphql.vscode-graphql-syntax - hashicorp.hcl - hashicorp.terraform - haskell.haskell - jnoortheen.nix-ide - kahole.magit - mads-hartmann.bash-ide-vscode - mkhl.direnv - ms-kubernetes-tools.vscode-kubernetes-tools - ms-python.python - redhat.ansible - redhat.vscode-xml - redhat.vscode-yaml - rust-lang.rust - signageos.signageos-vscode-sops - skellock.just - streetsidesoftware.code-spell-checker - streetsidesoftware.code-spell-checker-russian - streetsidesoftware.code-spell-checker-scientific-terms - tamasfe.even-better-toml - task.vscode-task - vscode-org-mode.org-mode - ] - ++ lib.optional cfg.vim.enable vscodevim.vim; - - userSettings = { - # Something tries to write this every startup. I can't be arsed to - # figure out what, so I'll leave this like this. - "accessibility.signals.terminalBell".sound = "on"; - - editor = { - codeLens = false; - cursorStyle = "block"; - detectIndentation = true; - minimap.enabled = false; - renderWhitespace = "trailing"; - rulers = [ - 80 - 120 - ]; - smoothScrolling = false; - tabCompletion = "on"; - cursorSurroundingLines = 10; - scrollBeyondLastColumn = 10; - }; + profiles.default = { + extensions = + with pkgs.open-vsx; + [ + editorconfig.editorconfig + efoerster.texlab + github.vscode-pull-request-github + golang.go + graphql.vscode-graphql + graphql.vscode-graphql-execution + graphql.vscode-graphql-syntax + hashicorp.hcl + hashicorp.terraform + haskell.haskell + jnoortheen.nix-ide + kahole.magit + mads-hartmann.bash-ide-vscode + mkhl.direnv + ms-kubernetes-tools.vscode-kubernetes-tools + ms-python.python + redhat.ansible + redhat.vscode-xml + redhat.vscode-yaml + rust-lang.rust + signageos.signageos-vscode-sops + skellock.just + streetsidesoftware.code-spell-checker + streetsidesoftware.code-spell-checker-russian + streetsidesoftware.code-spell-checker-scientific-terms + tamasfe.even-better-toml + task.vscode-task + vscode-org-mode.org-mode + ] + ++ lib.optional cfg.vim.enable vscodevim.vim; + + userSettings = { + # Something tries to write this every startup. I can't be arsed to + # figure out what, so I'll leave this like this. + "accessibility.signals.terminalBell".sound = "on"; + + editor = { + codeLens = false; + cursorStyle = "block"; + detectIndentation = true; + minimap.enabled = false; + renderWhitespace = "trailing"; + rulers = [ + 80 + 120 + ]; + smoothScrolling = false; + tabCompletion = "on"; + cursorSurroundingLines = 10; + scrollBeyondLastColumn = 10; + }; - keyboard.dispatch = "keyCode"; + keyboard.dispatch = "keyCode"; - diffEditor.codeLens = false; + diffEditor.codeLens = false; - files = { - autoSave = "off"; - enableTrash = false; - }; + files = { + autoSave = "off"; + enableTrash = false; + }; - workbench = { - activityBar.location = "hidden"; - colorTheme = "Default Light Modern"; - editor.highlightModifiedTabs = true; - enableExperiments = false; - settings.enableNaturalLanguageSearch = false; - startupEditor = "none"; - tips.enabled = false; - tree.indent = 4; - welcomePage = { - walkthroughs.openOnInstall = false; - preferReducedMotion = true; + workbench = { + activityBar.location = "hidden"; + colorTheme = "Default Light Modern"; + editor.highlightModifiedTabs = true; + enableExperiments = false; + settings.enableNaturalLanguageSearch = false; + startupEditor = "none"; + tips.enabled = false; + tree.indent = 4; + welcomePage = { + walkthroughs.openOnInstall = false; + preferReducedMotion = true; + }; }; - }; - extensions = { - autoCheckUpdates = false; - autoUpdate = false; - ignoreRecommendations = true; - }; + extensions = { + autoCheckUpdates = false; + autoUpdate = false; + ignoreRecommendations = true; + }; - terminal.integrated = { - enableBell = true; - }; + terminal.integrated = { + enableBell = true; + }; - update = { - mode = "none"; - showReleaseNotes = false; - }; + update = { + mode = "none"; + showReleaseNotes = false; + }; - telemetry = { - enableCrashReporter = false; - enableTelemetry = false; - }; + telemetry = { + enableCrashReporter = false; + enableTelemetry = false; + }; - security.workspace.trust.enabled = false; + security.workspace.trust.enabled = false; - # Extensions. + # Extensions. - ansible = { ansible = { - useFullyQualifiedCollectionNames = true; - reuseTerminal = true; + ansible = { + useFullyQualifiedCollectionNames = true; + reuseTerminal = true; + }; + validation.lint.path = lib.getExe' pkgs.ansible-lint "ansible-lint"; }; - validation.lint.path = lib.getExe' pkgs.ansible-lint "ansible-lint"; - }; - bashIde.shellcheckPath = lib.getExe' pkgs.shellcheck "shellcheck"; + bashIde.shellcheckPath = lib.getExe' pkgs.shellcheck "shellcheck"; - cSpell.language = "en-GB,en,ru"; + cSpell.language = "en-GB,en,ru"; - direnv.restart.automatic = true; + direnv.restart.automatic = true; - magit = { - forge-enabled = true; - git-path = lib.getExe config.hm.programs.git.package; - }; + magit = { + forge-enabled = true; + git-path = lib.getExe config.hm.programs.git.package; + }; - git.openRepositoryInParentFolders = "always"; + git.openRepositoryInParentFolders = "always"; - github = { - branchProtection = true; - gitProtocol = "ssh"; - }; + github = { + branchProtection = true; + gitProtocol = "ssh"; + }; - # terraform = { - # languageServer.path = lib.getExe' pkgs.terraform-ls "terraform-ls"; - # languageServer.terraform.path = lib.getExe pkgs.opentofu; - # }; - - # haskell = { - # formattingProvider = "ormolu"; - # serverExecutablePath = lib.getExe' pkgs.haskell-language-server "haskell-language-server"; - # }; - - nix = { - formatterPath = lib.getExe pkgs.nixfmt; - enableLanguageServer = true; - serverPath = lib.getExe pkgs.nixd; - serverSettings.nixd.formatting.command = lib.getExe pkgs.nixfmt; - }; + terraform = { + languageServer.path = lib.getExe' pkgs.terraform-ls "terraform-ls"; + languageServer.terraform.path = lib.getExe pkgs.terraform; + }; - # python = with pkgs.python311Packages; { - # experiments.optOutFrom = [ "All" ]; - # pipenvPath = lib.getExe' pkgs.pipenv "pipenv"; - # poetryPath = lib.getExe' pkgs.poetry "poetry"; - # formatting = { - # provider = "black"; - # autopep8Path = lib.getExe' autopep8 "autopep8"; - # blackPath = lib.getExe' black "black"; - # yapfPath = lib.getExe' yapf "yapf"; - # }; - # linting = { - # enabled = true; - # banditPath = lib.getExe' bandit "bandit"; - # flake8Path = lib.getExe' flake8 "flake8"; - # mypyPath = lib.getExe' mypy "mypy"; - # pycodestylePath = lib.getExe' pycodestyle "pycodestyle"; - # pydocstylePath = lib.getExe' pydocstyle "pydocstyle"; - # pylamaPath = lib.getExe' pylama "pylama"; - # pylintPath = lib.getExe' pylint "pylint"; - # }; - # testing = { - # pytestPath = lib.getExe' pytest "pytest"; - # }; - # }; - - # rust-client = { - # disableRustup = true; - # rustupPath = lib.getExe' pkgs.rustup "rustup"; - # rustfmt_path = lib.getExe pkgs.rustfmt; - # }; - - vim = lib.mkIf cfg.vim.enable { - easymotion = true; - - leader = " "; - - useSystemClipboard = true; - }; + haskell = { + formattingProvider = "ormolu"; + serverExecutablePath = lib.getExe' pkgs.haskell-language-server "haskell-language-server"; + }; - redhat.telemetry.enabled = false; + nix = { + formatterPath = lib.getExe pkgs.nixfmt; + enableLanguageServer = true; + serverPath = lib.getExe pkgs.nixd; + serverSettings.nixd.formatting.command = lib.getExe pkgs.nixfmt; + }; + + python.experiments.optOutFrom = [ "All" ]; + + rust-client = { + disableRustup = true; + rustupPath = lib.getExe' pkgs.rustup "rustup"; + rustfmt_path = lib.getExe pkgs.rustfmt; + }; + + vim = lib.mkIf cfg.vim.enable { + easymotion = true; + leader = " "; + useSystemClipboard = true; + }; + + redhat.telemetry.enabled = false; + }; }; }; }; |