Compare commits
No commits in common. "f6174bc0ba8555172408c61506e7c3edaaa15c54" and "f1b86275da6546d0125499b65ccb9941a55840ca" have entirely different histories.
f6174bc0ba
...
f1b86275da
8 changed files with 18 additions and 136 deletions
|
@ -4,23 +4,16 @@
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.profiles.webis;
|
cfg = config.my.profiles.webis;
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options.my.profiles.webis.enable = mkEnableOption "webis profile";
|
options.my.profiles.webis.enable = mkEnableOption "webis profile";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
my.programs = {
|
my.programs.ssh.includeSecrets = [ ../../secrets/webis-ssh.age ];
|
||||||
ssh.includeSecrets = [ ../../secrets/webis-ssh.age ];
|
|
||||||
jetbrains = {
|
|
||||||
pycharm.enable = true;
|
|
||||||
pycharm.package = pkgs.jetbrains.pycharm-professional;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets.webis = {
|
age.secrets.webis = {
|
||||||
file = ../../secrets/webis.age;
|
file = ../../secrets/webis.age;
|
||||||
name = "webis.ovpn";
|
name = "webis.ovpn";
|
||||||
|
@ -32,6 +25,9 @@ in
|
||||||
updateResolvConf = true;
|
updateResolvConf = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
jetbrains.pycharm-professional
|
||||||
|
];
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
|
# HACK: to make foot server work
|
||||||
|
systemd.user.services.foot.Service.Environment = lib.mkForce "PATH=/run/current-system/sw/bin/";
|
||||||
programs.foot = {
|
programs.foot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -133,7 +133,7 @@ in
|
||||||
windowrulev2 = rounding 0, xwayland:1, floating:1
|
windowrulev2 = rounding 0, xwayland:1, floating:1
|
||||||
windowrulev2 = center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$
|
windowrulev2 = center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$
|
||||||
windowrulev2 = size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$
|
windowrulev2 = size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$
|
||||||
windowrulev2 = nofocus, class:^jetbrains-(?!toolbox), floating:1, title:^win\d+$
|
${mkRules ["opaque" "noshadow" "noblur" "noanim" "move cursor 5 5"] ["class:^(.*jetbrains-.*)$"]}
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
$mainMod = SUPER
|
$mainMod = SUPER
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption any filterAttrs mapAttrsToList;
|
|
||||||
cfg = config.my.programs.jetbrains;
|
|
||||||
isEnabled = _: value: value.enable;
|
|
||||||
anyEnabled = any (x: x) (mapAttrsToList isEnabled cfg);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my.programs.jetbrains = {
|
|
||||||
pycharm = {
|
|
||||||
enable = mkEnableOption "pycharm";
|
|
||||||
package = mkOption {
|
|
||||||
default = pkgs.jetbrains.pycharm-community;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
idea = {
|
|
||||||
enable = mkEnableOption "idea";
|
|
||||||
package = mkOption {
|
|
||||||
default = pkgs.jetbrains.pycharm-community;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf anyEnabled {
|
|
||||||
home-manager.users.moritz = {
|
|
||||||
xdg.configFile."ideavim/ideavimrc" = {
|
|
||||||
source = ./ideavimrc;
|
|
||||||
};
|
|
||||||
home.packages =
|
|
||||||
let
|
|
||||||
enabledPackages = filterAttrs isEnabled cfg;
|
|
||||||
in
|
|
||||||
mapAttrsToList (_: value: value.package) enabledPackages;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
""" Map leader to space ---------------------
|
|
||||||
let mapleader=" "
|
|
||||||
|
|
||||||
""" Plugins --------------------------------
|
|
||||||
set surround
|
|
||||||
set commentary
|
|
||||||
|
|
||||||
""" Common settings -------------------------
|
|
||||||
set showmode
|
|
||||||
set so=5
|
|
||||||
set incsearch
|
|
||||||
set nu
|
|
||||||
|
|
||||||
""" Which-Key
|
|
||||||
set which-key
|
|
||||||
set timeoutlen=5000
|
|
||||||
|
|
||||||
""" Idea specific settings ------------------
|
|
||||||
set ideajoin
|
|
||||||
|
|
||||||
""" Mappings --------------------------------
|
|
||||||
"" Quick action
|
|
||||||
let g:WhichKeyDesc_quick_action = '<leader>q Quick action'
|
|
||||||
map <leader>q <Action>(ShowIntentionActions)
|
|
||||||
|
|
||||||
"" Refactor binds
|
|
||||||
let g:WhichKeyDesc_inline = '<leader>i Inline'
|
|
||||||
map <leader>i <Action>(Inline)
|
|
||||||
|
|
||||||
let g:WhichKeyDesc_extract = '<leader>e Extract'
|
|
||||||
let g:WhichKeyDesc_extract_variable = '<leader>ev Extract variable'
|
|
||||||
map <leader>ev <Action>(IntroduceVariable)
|
|
||||||
let g:WhichKeyDesc_extract_constant = '<leader>ec Extract constant'
|
|
||||||
map <leader>ec <Action>(IntroduceConstant)
|
|
||||||
let g:WhichKeyDesc_extract_field = '<leader>ef Extract field'
|
|
||||||
map <leader>ef <Action>(IntroduceField)
|
|
||||||
let g:WhichKeyDesc_extract_parameter = '<leader>ep Extract parameter'
|
|
||||||
map <leader>ep <Action>(IntroduceParameter)
|
|
||||||
|
|
||||||
let g:WhichKeyDesc_rename = '<leader>r Rename'
|
|
||||||
map <leader>r <Action>(RenameElement)
|
|
||||||
|
|
||||||
"" Navigation
|
|
||||||
let g:WhichKeyDesc_prev_buffer = ']b Previous buffer'
|
|
||||||
map [b <Action>(PreviousTab)
|
|
||||||
let g:WhichKeyDesc_next_buffer = ']b Next buffer'
|
|
||||||
map ]b <Action>(NextTab)
|
|
||||||
|
|
||||||
let g:WhichKeyDesc_prev_error = 'gI Goto Implementation'
|
|
||||||
map gI <Action>(GotoImplementation)
|
|
||||||
|
|
||||||
"" Other
|
|
||||||
let g:WhichKeyDesc_terminal = '<leader>t Terminal'
|
|
||||||
map <leader>t <Action>(ActivateTerminalToolWindow)
|
|
||||||
map <Esc> <Action>(HideActiveWindow)
|
|
||||||
map = <Action>(ReformatCode)
|
|
||||||
|
|
||||||
"" Folding
|
|
||||||
let g:WhichKeyDesc_folding = 'z Folding'
|
|
||||||
let g:WhichKeyDesc_folding_toggle = 'za Toggle fold'
|
|
||||||
map za <Action>(ExpandCollapseToggleAction)
|
|
||||||
|
|
||||||
let g:WhichKeyDesc_folding_expand = 'zr Fold less'
|
|
||||||
map zr <Action>(ExpandRegion)
|
|
||||||
let g:WhichKeyDesc_folding_collapse = 'zR Open all folds'
|
|
||||||
map zR <Action>(ExpandAllRegions)
|
|
||||||
let g:WhichKeyDesc_folding_collapse = 'zm Fold more'
|
|
||||||
map zm <Action>(CollapseRegion)
|
|
||||||
let g:WhichKeyDesc_folding_collapse = 'zM Close all folds'
|
|
||||||
map zM <Action>(CollapseAllRegions)
|
|
||||||
|
|
||||||
let g:WhichKeyDesc_folding_collapse_doc = 'zc Collapse doc comments'
|
|
||||||
map zc <Action>(CollapseDocComments)
|
|
||||||
let g:WhichKeyDesc_folding_expand_doc = 'zC Expand doc comments'
|
|
||||||
map zC <Action>(ExpandDocComments)
|
|
||||||
|
|
||||||
let g:WhichKeyDesc_folding_expand_level_one = 'z1 Expand all to level 1'
|
|
||||||
map z1 <Action>(ExpandAllToLevel1)
|
|
||||||
let g:WhichKeyDesc_folding_expand_level_two = 'z2 Expand all to level 2'
|
|
||||||
map z2 <Action>(ExpandAllToLevel2)
|
|
||||||
let g:WhichKeyDesc_folding_expand_level_three = 'z3 Expand all to level 3'
|
|
||||||
map z3 <Action>(ExpandAllToLevel3)
|
|
||||||
let g:WhichKeyDesc_folding_expand_level_four = 'z4 Expand all to level 4'
|
|
||||||
map z4 <Action>(ExpandAllToLevel4)
|
|
|
@ -36,13 +36,12 @@ in
|
||||||
nixd
|
nixd
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
python3Packages.python-lsp-server
|
nodePackages.jsonlint
|
||||||
python3Packages.ruff-lsp
|
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
stable.yamlfix
|
|
||||||
statix
|
statix
|
||||||
taplo
|
taplo
|
||||||
|
stable.yamlfix
|
||||||
yamllint
|
yamllint
|
||||||
];
|
];
|
||||||
extraLuaConfig = readFile ./options.lua;
|
extraLuaConfig = readFile ./options.lua;
|
||||||
|
|
|
@ -10,6 +10,7 @@ null_ls.setup({
|
||||||
null_ls.builtins.diagnostics.deadnix,
|
null_ls.builtins.diagnostics.deadnix,
|
||||||
null_ls.builtins.diagnostics.dotenv_linter,
|
null_ls.builtins.diagnostics.dotenv_linter,
|
||||||
null_ls.builtins.diagnostics.fish,
|
null_ls.builtins.diagnostics.fish,
|
||||||
|
null_ls.builtins.diagnostics.jsonlint,
|
||||||
null_ls.builtins.diagnostics.shellcheck,
|
null_ls.builtins.diagnostics.shellcheck,
|
||||||
null_ls.builtins.diagnostics.statix,
|
null_ls.builtins.diagnostics.statix,
|
||||||
null_ls.builtins.diagnostics.trail_space,
|
null_ls.builtins.diagnostics.trail_space,
|
||||||
|
|
|
@ -23,7 +23,12 @@ local lspconfig = require("lspconfig")
|
||||||
local on_attach_def = function(client, bufnr)
|
local on_attach_def = function(client, bufnr)
|
||||||
require("which-key").register({
|
require("which-key").register({
|
||||||
K = {
|
K = {
|
||||||
vim.lsp.buf.hover,
|
function()
|
||||||
|
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||||
|
if not winid then
|
||||||
|
vim.lsp.buf.hover()
|
||||||
|
end
|
||||||
|
end,
|
||||||
"Hover",
|
"Hover",
|
||||||
},
|
},
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
|
@ -97,7 +102,7 @@ local on_attach_def = function(client, bufnr)
|
||||||
}
|
}
|
||||||
local timeout = vim.tbl_contains(slow_lsp_servers, client.name, {}) and 500 or 0
|
local timeout = vim.tbl_contains(slow_lsp_servers, client.name, {}) and 500 or 0
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
vim.lsp.inlay_hint.enable(true, { bufnr })
|
vim.lsp.inlay_hint.enable(bufnr, true)
|
||||||
end, timeout)
|
end, timeout)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue