mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 18:32:24 +00:00
Compare commits
No commits in common. "dceb0c5c6554eae933ba899512ee6e2044da0760" and "83e95b306d3e544e3bf94268141c93cf5fff4065" have entirely different histories.
dceb0c5c65
...
83e95b306d
17
flake.lock
generated
17
flake.lock
generated
@ -232,6 +232,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"kitty-scrollback-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1716487246,
|
||||||
|
"narHash": "sha256-yHyco+ftcpJAVWhwA8ItKa0IZgNJZjCQQjuyVG93xUs=",
|
||||||
|
"owner": "mikesmithgh",
|
||||||
|
"repo": "kitty-scrollback.nvim",
|
||||||
|
"rev": "08960ad9a96ff6ea6269157dbd4a8a499f7a4311",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "mikesmithgh",
|
||||||
|
"repo": "kitty-scrollback.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nextcloud-cookbook": {
|
"nextcloud-cookbook": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -498,6 +514,7 @@
|
|||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
"hmts-nvim-src": "hmts-nvim-src",
|
"hmts-nvim-src": "hmts-nvim-src",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"kitty-scrollback-nvim-src": "kitty-scrollback-nvim-src",
|
||||||
"nextcloud-cookbook": "nextcloud-cookbook",
|
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||||
"nextcloud-external": "nextcloud-external",
|
"nextcloud-external": "nextcloud-external",
|
||||||
"nextcloud-news": "nextcloud-news",
|
"nextcloud-news": "nextcloud-news",
|
||||||
|
@ -117,6 +117,10 @@
|
|||||||
url = "github:j-hui/fidget.nvim/v1.4.5";
|
url = "github:j-hui/fidget.nvim/v1.4.5";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
kitty-scrollback-nvim-src = {
|
||||||
|
url = "github:mikesmithgh/kitty-scrollback.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
nvim-lint-src = {
|
nvim-lint-src = {
|
||||||
url = "github:mfussenegger/nvim-lint";
|
url = "github:mfussenegger/nvim-lint";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -50,9 +50,18 @@
|
|||||||
|
|
||||||
# Easy fullscreen toggle (for macOS)
|
# Easy fullscreen toggle (for macOS)
|
||||||
"super+f" = "toggle_fullscreen";
|
"super+f" = "toggle_fullscreen";
|
||||||
|
|
||||||
|
# Kitty scrollback nvim
|
||||||
|
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||||
|
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
|
# Required for kitty-scrollback.nvim
|
||||||
|
allow_remote_control = "socket-only";
|
||||||
|
listen_on = "unix:/tmp/kitty";
|
||||||
|
action_alias = "kitty_scrollback_nvim kitten ${pkgs.vimPlugins.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py --no-nvim-args";
|
||||||
|
|
||||||
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
|
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
|
||||||
background = config.theme.colors.base00;
|
background = config.theme.colors.base00;
|
||||||
foreground = config.theme.colors.base05;
|
foreground = config.theme.colors.base05;
|
||||||
|
@ -137,18 +137,11 @@
|
|||||||
initial_cols = 200,
|
initial_cols = 200,
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
-- sends completion string for fish autosuggestions
|
|
||||||
{
|
{
|
||||||
key = 'Enter',
|
key = 'Enter',
|
||||||
mods = 'SHIFT',
|
mods = 'SHIFT',
|
||||||
action = wezterm.action.SendString '\x1F'
|
action = wezterm.action.SendString '\x1F'
|
||||||
},
|
},
|
||||||
-- ctrl-shift-h was "hide"
|
|
||||||
{
|
|
||||||
key = 'H',
|
|
||||||
mods = 'SHIFT|CTRL',
|
|
||||||
action = wezterm.action.DisableDefaultAssignment
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
||||||
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
||||||
pkgs.vimPlugins.which-key-nvim # Keybind helper
|
pkgs.vimPlugins.which-key-nvim # Keybind helper
|
||||||
|
pkgs.vimPlugins.kitty-scrollback-nvim # Scrollback pager for kitty
|
||||||
];
|
];
|
||||||
|
|
||||||
# Initialize some plugins
|
# Initialize some plugins
|
||||||
@ -23,6 +24,14 @@
|
|||||||
};
|
};
|
||||||
setup.glow = { };
|
setup.glow = { };
|
||||||
setup.which-key = { };
|
setup.which-key = { };
|
||||||
|
setup.kitty-scrollback = {
|
||||||
|
global = dsl.rawLua ''
|
||||||
|
{
|
||||||
|
keymaps_enabled = false,
|
||||||
|
vim.keymap.set({ 'v' }, 'y', '<Plug>(KsbVisualYank)<CR><Plug>(KsbQuitAll)', {})
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
vim.o = {
|
vim.o = {
|
||||||
termguicolors = true; # Set to truecolor
|
termguicolors = true; # Set to truecolor
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||||
pkgs.vimPlugins.nginx-vim
|
pkgs.vimPlugins.nginx-vim
|
||||||
pkgs.vimPlugins.vim-helm
|
pkgs.vimPlugins.vim-helm
|
||||||
|
pkgs.vimPlugins.baleia-nvim # Clean ANSI from kitty scrollback
|
||||||
# pkgs.vimPlugins.hmts-nvim # Tree-sitter injections for home-manager
|
# pkgs.vimPlugins.hmts-nvim # Tree-sitter injections for home-manager
|
||||||
(pkgs.vimUtils.buildVimPlugin {
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
pname = "nmasur";
|
pname = "nmasur";
|
||||||
|
@ -48,6 +48,12 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Set Neovim as the kitty terminal "scrollback" (vi mode) option.
|
||||||
|
# Requires removing some of the ANSI escape codes that are sent to the
|
||||||
|
# scrollback using sed and baleia, as well as removing several
|
||||||
|
# unnecessary features.
|
||||||
|
programs.kitty.settings.scrollback_pager = "${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
|
||||||
|
|
||||||
# Create a desktop option for launching Neovim from a file manager
|
# Create a desktop option for launching Neovim from a file manager
|
||||||
# (Requires launching the terminal and then executing Neovim)
|
# (Requires launching the terminal and then executing Neovim)
|
||||||
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
13
overlays/kitty-scrollback-nvim.patch
Normal file
13
overlays/kitty-scrollback-nvim.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/lua/kitty-scrollback/health.lua b/lua/kitty-scrollback/health.lua
|
||||||
|
index 9d87dfa..a231b8d 100644
|
||||||
|
--- a/lua/kitty-scrollback/health.lua
|
||||||
|
+++ b/lua/kitty-scrollback/health.lua
|
||||||
|
@@ -234,7 +234,7 @@ local function check_kitty_debug_config()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function check_kitty_scrollback_nvim_version()
|
||||||
|
- local current_version = nil
|
||||||
|
+ local current_version = 'master'
|
||||||
|
local tag_cmd = { 'git', 'describe', '--exact-match', '--tags' }
|
||||||
|
local ksb_dir =
|
||||||
|
vim.fn.fnamemodify(vim.api.nvim_get_runtime_file('lua/kitty-scrollback', false)[1], ':h:h')
|
@ -38,5 +38,11 @@ in
|
|||||||
base16-nvim = plugin "base16-nvim" inputs.base16-nvim-src;
|
base16-nvim = plugin "base16-nvim" inputs.base16-nvim-src;
|
||||||
baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
|
baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
|
||||||
hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
|
hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
|
||||||
|
kitty-scrollback-nvim = prev.vimUtils.buildVimPlugin {
|
||||||
|
pname = "kitty-scrollback-nvim";
|
||||||
|
src = inputs.kitty-scrollback-nvim-src;
|
||||||
|
version = "master";
|
||||||
|
patches = [ ./kitty-scrollback-nvim.patch ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user