Trying vscodium out
This commit is contained in:
@ -15,7 +15,8 @@
|
||||
# programs
|
||||
browser = "qutebrowser";
|
||||
brave.enable = true;
|
||||
editor = "emacs";
|
||||
editor = "vscodium";
|
||||
emacs.enable = true;
|
||||
ranger.enable = true;
|
||||
yazi.enable = true;
|
||||
git.enable = true;
|
||||
|
@ -15,7 +15,8 @@
|
||||
# programs
|
||||
browser = "qutebrowser";
|
||||
brave.enable = true;
|
||||
editor = "emacs";
|
||||
editor = "vscodium";
|
||||
emacs.enable = true;
|
||||
ranger.enable = true;
|
||||
yazi.enable = true;
|
||||
git.enable = true;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
# programs
|
||||
browser = "brave";
|
||||
editor = "kate";
|
||||
editor = "vscodium";
|
||||
ranger.enable = true;
|
||||
yazi.enable = true;
|
||||
git.enable = true;
|
||||
|
@ -14,7 +14,8 @@
|
||||
# programs
|
||||
browser = "qutebrowser";
|
||||
brave.enable = true;
|
||||
editor = "emacs";
|
||||
editor = "vscodium";
|
||||
emacs.enable = true;
|
||||
ranger.enable = true;
|
||||
yazi.enable = true;
|
||||
git.enable = true;
|
||||
@ -42,7 +43,7 @@
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
openldap ldapvi
|
||||
openldap ldapvi rclone teams-for-linux
|
||||
];
|
||||
|
||||
home.sessionVariables = lib.mkIf config.userSettings.hyprland.enable {
|
||||
|
@ -6,9 +6,9 @@ let
|
||||
in {
|
||||
options = {
|
||||
userSettings.editor = lib.mkOption {
|
||||
default = "emacs";
|
||||
default = "vscodium";
|
||||
description = "Default editor";
|
||||
type = lib.types.enum [ "emacs" "kate" ];
|
||||
type = lib.types.enum [ "emacs" "kate" "vscodium" ];
|
||||
# TODO add more editors
|
||||
#type = lib.types.enum [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium" "kate" "pulsar" ];
|
||||
};
|
||||
@ -20,13 +20,25 @@ in {
|
||||
|
||||
config = {
|
||||
userSettings.emacs.enable = lib.mkIf (config.userSettings.editor == "emacs") true;
|
||||
userSettings.vscodium.enable = lib.mkIf (config.userSettings.editor == "vscodium") true;
|
||||
home.packages = with pkgs;
|
||||
lib.optionals (editor == "kate") [ kdePackages.kate];
|
||||
userSettings.spawnEditor = lib.mkMerge [
|
||||
(lib.mkIf (editor == "emacs") "emacsclient -c -a 'emacs'")
|
||||
(lib.mkIf (editor == "neovide") "neovide -- --listen /tmp/nvimsocket")
|
||||
(lib.mkIf (editor == "vscodium") "codium -n")
|
||||
(lib.mkIf (builtins.elem editor [ "vim" "nvim" "nano" "micro" ]) ("exec " + term + " -e " + editor))
|
||||
(lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro"])) editor)
|
||||
(lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium"])) editor)
|
||||
];
|
||||
home.sessionVariables = {
|
||||
EDITOR =
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (editor == "emacs") "emacsclient -c")
|
||||
(lib.mkIf (editor == "neovide") "neovide -- --listen /tmp/nvimsocket")
|
||||
(lib.mkIf (editor == "vscodium") "codium -n")
|
||||
(lib.mkIf (builtins.elem editor [ "vim" "nvim" "nano" "micro" ]) ("exec " + term + " -e " + editor))
|
||||
(lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium" ])) editor)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -17,8 +17,8 @@ in {
|
||||
cura-appimage
|
||||
arduino-ide
|
||||
graphviz
|
||||
vscodium-fhs
|
||||
];
|
||||
userSettings.vscodium.enable = true;
|
||||
xdg.desktopEntries.cura = lib.mkForce {
|
||||
name = "Ultimaker Cura";
|
||||
genericName = "3D Printing Software";
|
||||
|
95
modules/user/vscodium/default.nix
Normal file
95
modules/user/vscodium/default.nix
Normal file
@ -0,0 +1,95 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.userSettings.vscodium;
|
||||
in {
|
||||
options = {
|
||||
userSettings.vscodium = {
|
||||
enable = lib.mkEnableOption "Enable vscodium";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
vscodevim.vim
|
||||
kahole.magit
|
||||
jnoortheen.nix-ide
|
||||
mkhl.direnv
|
||||
geequlim.godot-tools
|
||||
yzhang.markdown-all-in-one
|
||||
];
|
||||
profiles.default.userSettings = {
|
||||
"keyboard.dispatch" = "keyCode";
|
||||
};
|
||||
profiles.default.keybindings = [
|
||||
{
|
||||
"key" = "g g";
|
||||
"command" = "cursorTop";
|
||||
"when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" ;
|
||||
}
|
||||
{ "key" = "g r";
|
||||
"command" = "magit.refresh";
|
||||
"when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" ;
|
||||
}
|
||||
{
|
||||
"key" = "tab";
|
||||
"command" = "extension.vim_tab";
|
||||
"when" = "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'";
|
||||
}
|
||||
{
|
||||
"key" = "tab";
|
||||
"command" = "-extension.vim_tab";
|
||||
}
|
||||
{
|
||||
"key" = "x";
|
||||
"command" = "magit.discard-at-point";
|
||||
"when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/";
|
||||
}
|
||||
{
|
||||
"key" = "k";
|
||||
"command" = "-magit.discard-at-point";
|
||||
}
|
||||
{
|
||||
"key" = "-";
|
||||
"command" = "magit.reverse-at-point";
|
||||
"when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/";
|
||||
}
|
||||
{
|
||||
"key" = "v";
|
||||
"command" = "-magit.reverse-at-point";
|
||||
}
|
||||
{
|
||||
"key" = "shift+-";
|
||||
"command" = "magit.reverting";
|
||||
"when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/";
|
||||
}
|
||||
{
|
||||
"key" = "shift+v";
|
||||
"command" = "-magit.reverting";
|
||||
}
|
||||
{
|
||||
"key" = "shift+o";
|
||||
"command" = "magit.resetting";
|
||||
"when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/";
|
||||
}
|
||||
{
|
||||
"key" = "shift+x";
|
||||
"command" = "-magit.resetting";
|
||||
}
|
||||
{
|
||||
"key" = "x";
|
||||
"command" = "-magit.reset-mixed";
|
||||
}
|
||||
{
|
||||
"key" = "ctrl+u x";
|
||||
"command" = "-magit.reset-hard";
|
||||
}
|
||||
];
|
||||
mutableExtensionsDir = false;
|
||||
|
||||
};
|
||||
stylix.targets.vscode.enable = true;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user