neovim before nixvim

Signed-off-by: Michael Thomson <michael@michaelthomson.dev>
This commit is contained in:
Michael Thomson 2024-11-13 14:11:33 -05:00
parent 1f361e80f6
commit 67be496482
No known key found for this signature in database
GPG Key ID: 8EFECCD347C72F7D
12 changed files with 74 additions and 106 deletions

View File

@ -45,7 +45,7 @@
skhd = { skhd = {
enable = true; enable = true;
skhdConfig = '' skhdConfig = ''
cmd - return : wezterm cmd - return : kitty
''; '';
}; };
}; };

View File

@ -6,12 +6,12 @@
../../modules/home-manager/neovim ../../modules/home-manager/neovim
../../modules/home-manager/emacs ../../modules/home-manager/emacs
../../modules/home-manager/wezterm ../../modules/home-manager/wezterm
../../modules/home-manager/kitty
../../modules/home-manager/zsh ../../modules/home-manager/zsh
../../modules/home-manager/tmux ../../modules/home-manager/tmux
../../modules/home-manager/zoxide ../../modules/home-manager/zoxide
../../modules/home-manager/irssi ../../modules/home-manager/irssi
../../modules/home-manager/email ../../modules/home-manager/email
../../modules/home-manager/zk
../../modules/home-manager/password-store ../../modules/home-manager/password-store
../../modules/home-manager/taskwarrior ../../modules/home-manager/taskwarrior
]; ];

View File

@ -1,27 +1,22 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "Iosevka" "NerdFontsSymbolsOnly" ]; })
];
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = { font = {
name = "Iosevka Nerd Font Mono"; name = "JetBrainsMono Nerd Font";
size = 12; size = 12;
}; };
shellIntegration = { shellIntegration = {
enableZshIntegration = true; enableZshIntegration = true;
}; };
theme = "Catppuccin-Frappe"; themeFile = "kanagawa";
darwinLaunchOptions = [ # darwinLaunchOptions = [
"--single-instance" # "--single-instance"
]; # ];
settings = { settings = {
background_opacity = "0.9"; background_opacity = "0.9";
background_blur = 5; background_blur = 5;
macos_traditional_fullscreen = "yes";
}; };
}; };
} }

View File

@ -8,7 +8,7 @@
luajit luajit
lua-language-server lua-language-server
nil nil
(nerdfonts.override { fonts = [ "Iosevka" ]; }) (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
]; ];
programs.neovim = { programs.neovim = {

View File

@ -5,5 +5,12 @@ return {
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown' ---@module 'render-markdown'
---@type render.md.UserConfig ---@type render.md.UserConfig
opts = {}, opts = {
-- heading = {
-- position = 'inline',
-- },
sign = {
enabled = false,
},
},
} }

View File

@ -3,31 +3,12 @@ return {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
config = function() config = function()
require('nvim-treesitter.configs').setup({ require('nvim-treesitter.configs').setup({
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false, sync_install = false,
-- Automatically install missing parsers when entering buffer
auto_install = true, auto_install = true,
-- indent module
indent = { enable = true }, indent = { enable = true },
-- highlight module
highlight = { enable = true }, highlight = { enable = true },
-- auto close tags in html/jsx/tsx
autotag = { enable = true }, autotag = { enable = true },
incremental_selection = {
enable = false,
keymaps = {
init_selection = '<CR>',
scope_incremental = '<CR>',
node_incremental = '<TAB>',
node_decremental = '<S-TAB>',
},
},
-- text object selection -- text object selection
textobjects = { textobjects = {
select = { select = {
@ -70,6 +51,17 @@ return {
}, },
}, },
}) })
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
function _G.MyFoldText()
local line = vim.fn.getline(vim.v.foldstart)
return line .. " 󱞣"
end
vim.opt.foldtext = 'v:lua.MyFoldText()'
vim.opt.fillchars:append(',fold: ')
vim.opt.foldlevel = 99;
end end
}, },
{ {

View File

@ -0,0 +1,8 @@
return {
"folke/zen-mode.nvim",
opts = {
window = {
width = 80,
},
},
}

View File

@ -1,23 +0,0 @@
return {
"zk-org/zk-nvim",
config = function()
require("zk").setup({
picker = "minipick",
})
local opts = { noremap=true, silent=false }
-- Create a new note after asking for its title.
vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zd", "<Cmd>ZkNew { dir = \"journal/daily\" }<CR>", opts)
-- Open notes.
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
-- Open notes associated with the selected tags.
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
-- Search for the notes matching a given query.
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
-- Search for the notes matching the current visual selection.
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
end
}

View File

@ -1,8 +1,12 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
# TODO: Remove the default shell and default-command once tmux sensibleOnTop fixes their shit
# ref: https://github.com/nix-community/home-manager/issues/5952
{ {
programs = { programs = {
tmux = { tmux = {
shell = "${pkgs.zsh}/bin/zsh";
enable = true; enable = true;
shortcut = "Space"; shortcut = "Space";
mouse = true; mouse = true;
@ -31,6 +35,9 @@
set -g window-status-current-style "fg=$border_active_fg" set -g window-status-current-style "fg=$border_active_fg"
set -g window-status-style "fg=$fg" set -g window-status-style "fg=$fg"
set -gu default-command
set -g default-shell "$SHELL"
''; '';
}; };
}; };

View File

@ -6,7 +6,7 @@
extraConfig = '' extraConfig = ''
return { return {
-- color_scheme = 'Ayu Dark (Gogh)', -- color_scheme = 'Ayu Dark (Gogh)',
font = wezterm.font('Iosevka Nerd Font'), font = wezterm.font('JetBrainsMono Nerd Font'),
font_size = 16, font_size = 16,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
native_macos_fullscreen_mode = false, native_macos_fullscreen_mode = false,

View File

@ -1,30 +0,0 @@
{ pkgs, config, ... }:
{
programs = {
zk = {
enable = true;
settings = {
notebook = {
dir = "~/notes";
};
extra = {
author = "Michael Thomson";
};
alias = {
daily = "zk new --no-input \"$ZK_NOTEBOOK_DIR/journal/daily\"";
};
group = {
daily = {
paths = ["journal/daily"];
note = {
filename = "{{format-date now '%Y-%m-%d'}}";
extension = "md";
template = "daily.md";
};
};
};
};
};
};
}

View File

@ -2,31 +2,43 @@
{ {
home.sessionVariables = {
ZK_NOTEBOOK_DIR = "\${HOME}/notes";
};
programs = { programs = {
fzf = {
enable = true;
enableZshIntegration = true;
tmux = {
enableShellIntegration = true;
};
};
zsh = { zsh = {
enable = true; enable = true;
oh-my-zsh = { oh-my-zsh = {
enable = false; enable = false;
}; };
antidote = { autosuggestion = {
enable = true; enable = true;
plugins = [ };
"zsh-users/zsh-syntax-highlighting" syntaxHighlighting = {
"zsh-users/zsh-autosuggestions" enable = true;
"zsh-users/zsh-history-substring-search" };
]; enableCompletion = true;
history = {
append = true;
share = true;
ignoreSpace = true;
ignoreAllDups = true;
ignoreDups = true;
};
historySubstringSearch = {
enable = true;
searchUpKey = "^p";
searchDownKey = "^n";
}; };
shellAliases = { shellAliases = {
cd = "z"; cd = "z";
cdi = "zi"; cdi = "zi";
ls = "ls --color";
}; };
initExtra = ''
. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
'';
}; };
starship = { starship = {
enable = true; enable = true;