nvim: amp nvim

This commit is contained in:
Anish Lakhwara 2025-09-30 11:16:36 -07:00
parent 1177e076b0
commit 8c48ef0b5b
2 changed files with 51 additions and 9 deletions

View file

@ -1,9 +1,8 @@
{ pkgs }: { pkgs }:
if pkgs.stdenv.isDarwin && builtins.pathExists /Users/anishlakhwara/usr/amp.nvim then # Remove the conditional entirely for now to test
pkgs.vimUtils.buildVimPlugin { pkgs.vimUtils.buildVimPlugin {
pname = "amp-nvim"; pname = "amp-nvim";
version = "unstable"; version = "unstable";
src = /Users/anishlakhwara/usr/amp.nvim; src = /Users/anishlakhwara/usr/amp.nvim;
} }
else null

View file

@ -141,7 +141,7 @@ in
extraConfig = '' extraConfig = ''
" so our custom files still get included " so our custom files still get included
set runtimepath+=/home/anish/.config/nvim/ " set runtimepath+=/home/anish/.config/nvim/
set tabstop=2 set tabstop=2
set showmatch set showmatch
set shiftwidth=2 set shiftwidth=2
@ -290,6 +290,11 @@ in
nnoremap <leader>gp :Git! push<CR> nnoremap <leader>gp :Git! push<CR>
nnoremap <leader>gd :Gdiff<CR> nnoremap <leader>gd :Gdiff<CR>
nnoremap <leader>gc :G commit -v -q %:p<CR> nnoremap <leader>gc :G commit -v -q %:p<CR>
" diffview keybindings
nnoremap <leader>do :DiffviewOpen<CR>
nnoremap <leader>dc :DiffviewClose<CR>
nnoremap <leader>dh :DiffviewFileHistory %<CR>
nnoremap <leader>df :DiffviewFileHistory<CR>
" kitaab " kitaab
"map <leader>cz :VimwikiIndex<CR>:ZettelNew "map <leader>cz :VimwikiIndex<CR>:ZettelNew
@ -465,6 +470,9 @@ in
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true}) vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
-- nicer diff view
vim.opt.diffopt = {'internal', 'filler', 'closeoff', 'algorithm:patience', 'indent-heuristic'}
-- autopairs -- autopairs
require('nvim-autopairs').setup{} require('nvim-autopairs').setup{}
@ -842,8 +850,15 @@ in
-- Setup amp.nvim -- Setup amp.nvim
require('amp').setup({ require('amp').setup({
auto_start = true, auto_start = true,
log_level = "info" log_level = "info",
completion_enabled = true
}) })
-- require('amp.completion').setup({
-- keymaps = {
-- accept = "<C-y>",
-- dismiss = "<C-n>",
-- }
-- })
''} ''}
-- supercollider -- supercollider
@ -908,6 +923,33 @@ in
-- Open the code actions for a visual selection. -- Open the code actions for a visual selection.
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts) map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
-- diffview setup
require('diffview').setup{
use_icons = true,
view = {
default = {
layout = "diff2_horizontal",
},
merge_tool = {
layout = "diff3_horizontal",
disable_diagnostics = true,
},
},
file_panel = {
listing_style = "tree",
win_config = {
position = "left",
width = 35,
},
},
file_history_panel = {
win_config = {
position = "bottom",
height = 16,
},
},
}
-- zen mode -- zen mode
require('zen-mode').setup{ require('zen-mode').setup{
window = { window = {
@ -1078,6 +1120,7 @@ in
vim-fugitive vim-fugitive
gitsigns-nvim gitsigns-nvim
fzf-checkout-vim fzf-checkout-vim
diffview-nvim
# Clojure stuff # Clojure stuff
# conjure # conjure