Merge branch 'main' of git.sealight.xyz:aynish/helm
This commit is contained in:
@@ -301,11 +301,12 @@
|
||||
nepl = "n repl '<nixpkgs>'";
|
||||
srch = "ns nixpkgs";
|
||||
orch = "ns override";
|
||||
# Impure for bitwig on linux, not sure what it's for in darwin
|
||||
nrb = ''
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
cd ~/usr/helm && sudo darwin-rebuild switch --impure --flake ".#Anishs-MacBook-Pro" && cd $OLDPWD
|
||||
else
|
||||
cd /tmp && sudo nixos-rebuild switch --flake '/home/anish/usr/helm#curve' && cd $OLDPWD
|
||||
cd /tmp && sudo nixos-rebuild switch --flake --impure '/home/anish/usr/helm#curve' && cd $OLDPWD
|
||||
fi
|
||||
'';
|
||||
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
||||
|
||||
@@ -9,9 +9,8 @@ mouse_map left click ungrabbed mouse_click_url_or_select
|
||||
confirm_os_window_close 0
|
||||
enable_audio_bell no
|
||||
|
||||
|
||||
|
||||
# Ctrl+V for paste
|
||||
map ctrl+v paste_from_clipboard
|
||||
|
||||
-- Allows zen-mode.nvim to increase font size
|
||||
-- allow_remote_control socket-only
|
||||
-- listen_on unix:/tmp/kitty
|
||||
mouse_map middle release ungrabbed paste_from_clipboard
|
||||
|
||||
@@ -2,12 +2,35 @@
|
||||
|
||||
@import "config.rasi"
|
||||
|
||||
textbox {
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
listview {
|
||||
columns: 4;
|
||||
columns: 9;
|
||||
lines: 7;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
flow: horizontal;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
}
|
||||
|
||||
element {
|
||||
orientation: vertical;
|
||||
}
|
||||
|
||||
element-text {
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
font: "FiraCode Nerd Font 24";
|
||||
}
|
||||
|
||||
textbox-icon {
|
||||
str: "🎑";
|
||||
str: "❇️ ";
|
||||
}
|
||||
|
||||
prompt {
|
||||
|
||||
@@ -16,7 +16,7 @@ super + Return
|
||||
kitty
|
||||
|
||||
ctrl + super + Return
|
||||
xst -e bash -c "(tmux ls | grep -qEv 'attached|scratch' && tmux at) || tmux"
|
||||
tdrop -n tdrop_kitty --post-create-hook "autohide-tdrop &" -ma -h 60% -w 70% -x 15% -y 32 kitty --class=tdrop_kitty
|
||||
|
||||
super + space
|
||||
rofi -show drun -modi drun,run -show-icons -theme theme/appmenu.rasi
|
||||
@@ -25,7 +25,7 @@ super + Tab
|
||||
rofi -show window -show-icons -theme theme/windowmenu.rasi
|
||||
|
||||
super + e
|
||||
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy
|
||||
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy --hidden-descriptions
|
||||
|
||||
super + a
|
||||
paste
|
||||
|
||||
@@ -11,6 +11,15 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
amp-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "amp-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "sourcegraph";
|
||||
repo = "amp.nvim";
|
||||
rev = "main";
|
||||
sha256 = "1n6d8nbakyg6yiq8mhhrvmsp9z0zb8cb67820jsg3wl6vqd1vwv5";
|
||||
};
|
||||
}
|
||||
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "lspsaga.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
@@ -103,7 +112,6 @@ let
|
||||
doInstallCheck = false;
|
||||
nvimRequireCheck = "none";
|
||||
};
|
||||
amp-nvim = import ./amp-plugin.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
@@ -224,6 +232,7 @@ in
|
||||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
nnoremap <leader>ft <cmd>Telescope tags<cr>
|
||||
nnoremap <leader>fr <cmd>lua KitaabRecent()<cr>
|
||||
|
||||
" exit normal mode in terminal
|
||||
:tnoremap <C-n> <C-\><C-n>
|
||||
@@ -1021,6 +1030,110 @@ in
|
||||
vim.keymap.set('n', '<M-S-k>', '<Cmd>resize +2<CR>', {silent = true})
|
||||
vim.keymap.set('n', '<M-S-l>', '<Cmd>vertical resize +2<CR>', {silent = true})
|
||||
|
||||
-- Kitaab recent files (only date-based files, sorted reverse)
|
||||
function KitaabRecent()
|
||||
local pickers = require('telescope.pickers')
|
||||
local finders = require('telescope.finders')
|
||||
local conf = require('telescope.config').values
|
||||
|
||||
-- Use current working directory
|
||||
local kitaab_path = vim.fn.getcwd()
|
||||
|
||||
-- Get all files (depth 1, exclude directories)
|
||||
local files = vim.fn.readdir(kitaab_path, function(name)
|
||||
return vim.fn.isdirectory(kitaab_path .. '/' .. name) == 0
|
||||
end)
|
||||
|
||||
-- Filter to only date-based files (starting with digit)
|
||||
local date_files = {}
|
||||
for _, filename in ipairs(files) do
|
||||
if filename:match('^%d') then
|
||||
table.insert(date_files, filename)
|
||||
end
|
||||
end
|
||||
|
||||
-- Sort in reverse (most recent first)
|
||||
table.sort(date_files, function(a, b) return a > b end)
|
||||
|
||||
pickers.new({}, {
|
||||
prompt_title = 'Kitaab Recent',
|
||||
finder = finders.new_table({
|
||||
results = date_files,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = kitaab_path .. '/' .. entry,
|
||||
display = entry,
|
||||
ordinal = entry,
|
||||
path = kitaab_path .. '/' .. entry,
|
||||
}
|
||||
end
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
|
||||
-- Setup amp.nvim
|
||||
require('amp').setup({
|
||||
auto_start = true,
|
||||
log_level = "info"
|
||||
})
|
||||
|
||||
-- Amp commands
|
||||
vim.api.nvim_create_user_command("AmpSend", function(opts)
|
||||
local message = opts.args
|
||||
if message == "" then
|
||||
print("Please provide a message to send")
|
||||
return
|
||||
end
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_message(message)
|
||||
end, {
|
||||
nargs = "*",
|
||||
desc = "Send a message to Amp",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpSendBuffer", function(opts)
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
local content = table.concat(lines, "\n")
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_message(content)
|
||||
end, {
|
||||
nargs = "?",
|
||||
desc = "Send current buffer contents to Amp",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpPromptSelection", function(opts)
|
||||
local lines = vim.api.nvim_buf_get_lines(0, opts.line1 - 1, opts.line2, false)
|
||||
local text = table.concat(lines, "\n")
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_to_prompt(text)
|
||||
end, {
|
||||
range = true,
|
||||
desc = "Add selected text to Amp prompt",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpPromptRef", function(opts)
|
||||
local bufname = vim.api.nvim_buf_get_name(0)
|
||||
if bufname == "" then
|
||||
print("Current buffer has no filename")
|
||||
return
|
||||
end
|
||||
local relative_path = vim.fn.fnamemodify(bufname, ":.")
|
||||
local ref = "@" .. relative_path
|
||||
if opts.line1 ~= opts.line2 then
|
||||
ref = ref .. "#L" .. opts.line1 .. "-" .. opts.line2
|
||||
elseif opts.line1 > 1 then
|
||||
ref = ref .. "#L" .. opts.line1
|
||||
end
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_to_prompt(ref)
|
||||
end, {
|
||||
range = true,
|
||||
desc = "Add file reference (with selection) to Amp prompt",
|
||||
})
|
||||
|
||||
EOF
|
||||
|
||||
'';
|
||||
@@ -1139,16 +1252,16 @@ in
|
||||
# custom
|
||||
yuck-vim
|
||||
nvim-parinfer
|
||||
amp-nvim
|
||||
# vim-processing
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [
|
||||
# Linux-only plugins
|
||||
vim-tidal # requires SuperCollider which is Linux-only
|
||||
] ++ lib.optionals (customPlugins.amp-nvim != null) [
|
||||
customPlugins.amp-nvim
|
||||
];
|
||||
]
|
||||
withPython3 = true;
|
||||
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
|
||||
vimAlias = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user