From 26694e09e8f5bf2262737312e7ad217118db20de Mon Sep 17 00:00:00 2001 From: joott Date: Wed, 30 Jul 2025 15:53:29 -0400 Subject: switching to yadm --- nvim/lua/commands.lua | 28 ------------- nvim/lua/keymaps.lua | 96 ------------------------------------------- nvim/lua/luasnip-helpers.lua | 41 ------------------- nvim/lua/luasnip-nodes.lua | 31 -------------- nvim/lua/options.lua | 35 ---------------- nvim/lua/plugins.lua | 97 -------------------------------------------- 6 files changed, 328 deletions(-) delete mode 100644 nvim/lua/commands.lua delete mode 100644 nvim/lua/keymaps.lua delete mode 100644 nvim/lua/luasnip-helpers.lua delete mode 100644 nvim/lua/luasnip-nodes.lua delete mode 100644 nvim/lua/options.lua delete mode 100644 nvim/lua/plugins.lua (limited to 'nvim/lua') diff --git a/nvim/lua/commands.lua b/nvim/lua/commands.lua deleted file mode 100644 index 45b674f..0000000 --- a/nvim/lua/commands.lua +++ /dev/null @@ -1,28 +0,0 @@ -vim.api.nvim_create_autocmd("ColorScheme", { - pattern = "*", - callback = function() - package.loaded["feline"] = nil - package.loaded["neopywal.theme.plugins.feline"] = nil - require("feline").setup({ - components = require("neopywal.theme.plugins.feline").get(), - }) - end, -}) - -vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, { - pattern = '*.jl', - callback = function(ev) - vim.keymap.set('n', 'js', 'lua _jlrepl_open()', { noremap = true, silent = true , buffer = true }) - end -}) - -vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, { - pattern = '*.tex', - callback = function(ev) - vim.keymap.set('i', '', [[: silent exec '.!inkscape-figures create "'.getline('.').'" "'.b:vimtex.root.'/figures/"':w]], { buffer = true}) - vim.keymap.set('n', '', [[: silent exec '!inkscape-figures edit "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &':redraw!]], { buffer = true}) - - vim.keymap.set('i', '', [[: silent exec '.!xoppdog shake "'.getline('.').'" "'.b:vimtex.root.'/figures/"':w]], { buffer = true}) - vim.keymap.set('n', '', [[: silent exec '!xoppdog fetch "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &':redraw!]], { buffer = true}) - end -}) diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua deleted file mode 100644 index 519b336..0000000 --- a/nvim/lua/keymaps.lua +++ /dev/null @@ -1,96 +0,0 @@ -local function map(m, k, v) - vim.keymap.set(m, k, v, { noremap = true, silent = true }) -end -local builtin = require('telescope.builtin') - -map('', '', 'gk') -map('', '', 'gj') -map('n', 'J', 'mzJ`z') - -map('', 'o', 'o') -map('', 'O', 'O') - -map('t', '', [[]]) - -map('n', 'W', 'set wrap!') - --- telescope -map('n', 'pf', builtin.find_files, {}) -map('n', 'pg', function() - -- If the directory is not a git repository, fallback to regular find_files. - if pcall(builtin.git_files) then - else - pcall(builtin.find_files) - end -end, {}) -map('n', 'fs', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }) -end, {}) - --- mini -map('n', '-', 'lua MiniFiles.open()') -map('n', 'wt', 'lua MiniTrailspace.trim()') - --- toggleterm -map('n', 'g', 'lua _lazygit_toggle()') - --- misc plugin keymaps -map('n', 'u', vim.cmd.UndotreeToggle) - -map('n', '', vim.cmd.HopWord) - -map('n', 'vv', vim.cmd.VimtexCompile) -map('n', 'vc', 'VimtexClean!') - -map('n', 'tw', 'Twilight') - -map('n', 'o', 'Outline') - --- buffers -map('n', '', 'bnext') -map('n', '', 'bprevious') -map('n', 'br', 'BufferClose') -map('n', 'Q', 'BufferClose!') -map('n', 'bn', 'BufferOrderByBufferNumber') -map('n', 'U', 'bufdo bd') --close all -map('n', 'vs', 'vsplitbnext') --ver split + open next buffer - --- buffer position nav + reorder -map('n', '', 'BufferMovePrevious') -map('n', '', 'BufferMoveNext') -map('n', '', 'BufferGoto 1') -map('n', '', 'BufferGoto 2') -map('n', '', 'BufferGoto 3') -map('n', '', 'BufferGoto 4') -map('n', '', 'BufferGoto 5') -map('n', '', 'BufferGoto 6') -map('n', '', 'BufferGoto 7') -map('n', '', 'BufferGoto 8') -map('n', '', 'BufferGoto 9') -map('n', '', 'BufferLast') -map('n', '', 'BufferPin') - --- window resizing -map('n', '', ':vertical resize -2') -map('n', '', ':vertical resize +2') -map('n', '', ':resize +2') -map('n', '', ':resize -2') - --- clipboard management -map('x', 'p', '\"_dP') - -map('n', 'y', '\"+y') -map('v', 'y', '\"+y') -map('n', 'Y', '\"+Y') - -map('n', 'd', '\"+d') -map('v', 'd', '\"+d') - --- luasnip -vim.cmd([[ -imap luasnip#expand_or_jumpable() ? 'luasnip-expand-or-jump' : '' -inoremap lua require'luasnip'.jump(-1) - -snoremap lua require('luasnip').jump(1) -snoremap lua require('luasnip').jump(-1) -]]) diff --git a/nvim/lua/luasnip-helpers.lua b/nvim/lua/luasnip-helpers.lua deleted file mode 100644 index e912046..0000000 --- a/nvim/lua/luasnip-helpers.lua +++ /dev/null @@ -1,41 +0,0 @@ -local n = require("luasnip-nodes") -local utils = {} - -utils.get_visual = function(args, parent) - if (#parent.snippet.env.LS_SELECT_RAW > 0) then - return n.sn(nil, n.i(1, parent.snippet.env.LS_SELECT_RAW)) - else -- If LS_SELECT_RAW is empty, return a blank insert node - return n.sn(nil, n.i(1)) - end -end - -utils.in_mathzone = function() -- math context detection - return vim.fn['vimtex#syntax#in_mathzone']() == 1 -end -utils.in_text = function() - return not utils.in_mathzone() -end -utils.in_comment = function() -- comment detection - return vim.fn['vimtex#syntax#in_comment']() == 1 -end -utils.in_env = function(name) -- generic environment detection - local is_inside = vim.fn['vimtex#env#is_inside'](name) - return (is_inside[1] > 0 and is_inside[2] > 0) -end --- A few concrete environments---adapt as needed -utils.in_equation = function() -- equation environment detection - return utils.in_env('equation') -end -utils.in_itemize = function() -- itemize environment detection - return utils.in_env('itemize') -end -utils.in_enumerate = function() -- itemize environment detection - return utils.in_env('enumerate') -end -utils.in_tikz = function() -- TikZ picture environment detection - return utils.in_env('tikzpicture') -end - -utils.line_begin = require("luasnip.extras.expand_conditions").line_begin - -return utils diff --git a/nvim/lua/luasnip-nodes.lua b/nvim/lua/luasnip-nodes.lua deleted file mode 100644 index 1b48f00..0000000 --- a/nvim/lua/luasnip-nodes.lua +++ /dev/null @@ -1,31 +0,0 @@ -local nodes = {} - -local ls = require("luasnip") -local extras = require("luasnip.extras") - -nodes.s = ls.snippet -nodes.sn = ls.snippet_node -nodes.isn = ls.indent_snippet_node -nodes.t = ls.text_node -nodes.i = ls.insert_node -nodes.f = ls.function_node -nodes.c = ls.choice_node -nodes.d = ls.dynamic_node -nodes.r = ls.restore_node -nodes.events = require("luasnip.util.events") -nodes.ai = require("luasnip.nodes.absolute_indexer") -nodes.l = extras.lambda -nodes.rep = extras.rep -nodes.p = extras.partial -nodes.m = extras.match -nodes.n = extras.nonempty -nodes.dl = extras.dynamic_lambda -nodes.fmt = require("luasnip.extras.fmt").fmt -nodes.fmta = require("luasnip.extras.fmt").fmta -nodes.conds = require("luasnip.extras.expand_conditions") -nodes.postfix = require("luasnip.extras.postfix").postfix -nodes.types = require("luasnip.util.types") -nodes.parse = require("luasnip.util.parser").parse_snippet -nodes.ms = ls.multi_snippet - -return nodes diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua deleted file mode 100644 index cd293f4..0000000 --- a/nvim/lua/options.lua +++ /dev/null @@ -1,35 +0,0 @@ -vim.cmd "set undofile" --- vim.opt.isfname:append("@-@") -vim.g.mapleader = ' ' - -local options = { - nu = true, - relativenumber = true, - - tabstop = 4, - softtabstop = 4, - shiftwidth = 4, - expandtab = true, - - smartindent = false, - autoindent = true, - - wrap = true, - - hlsearch = false, - incsearch = true, - - scrolloff = 8, - signcolumn = "no", - cursorline = true, - cursorlineopt = "number", - - ignorecase = true, - smartcase = true, - - showmode = false, -} - -for k, v in pairs(options) do - vim.opt[k] = v -end diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua deleted file mode 100644 index 8ddca61..0000000 --- a/nvim/lua/plugins.lua +++ /dev/null @@ -1,97 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -require("lazy").setup({ - "nvim-tree/nvim-web-devicons", - "mbbill/undotree", - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "neovim/nvim-lspconfig", - 'hrsh7th/nvim-cmp', - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-cmdline', - 'saadparwaiz1/cmp_luasnip', - 'feline-nvim/feline.nvim', - 'lervag/vimtex', - 'MeanderingProgrammer/render-markdown.nvim', - 'sitiom/nvim-numbertoggle', - 'folke/twilight.nvim', - 'lewis6991/gitsigns.nvim', - { 'akinsho/toggleterm.nvim', version = "*", config = true }, - { 'echasnovski/mini.files', version = '*' }, - { 'echasnovski/mini.trailspace', version = '*' }, - { 'echasnovski/mini.move', version = '*' }, - { 'numToStr/Comment.nvim', lazy = false, }, - { - "goolord/alpha-nvim", - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - local startify = require("alpha.themes.startify") - startify.file_icons.provider = "devicons" - require("alpha").setup( - startify.config - ) - end, - }, - { - 'nvim-telescope/telescope.nvim', branch = '0.1.x', - dependencies = { 'nvim-lua/plenary.nvim' } - }, - { - "nvim-treesitter/nvim-treesitter", - build = function() - require("nvim-treesitter.install").update({ with_sync = true }) - end, - }, - { - "L3MON4D3/LuaSnip", - version = "v2.*", - build = "make install_jsregexp" - }, - { - "smoka7/hop.nvim", - version = "*", - config = function() - require("hop").setup({ keys = "tnseridhaofuwyplcqxz" }) - end, - }, - { - 'romgrk/barbar.nvim', - init = function() vim.g.barbar_auto_setup = false end, - opts = { - sidebar_filetypes = { - undotree = { - text = 'undotree', - align = 'center', - }, - }, - }, - }, - { - 'windwp/nvim-autopairs', - event = "InsertEnter", - config = true - }, - { - 'RedsXDD/neopywal.nvim', - name = "neopywal", - lazy = false, - priority = 1000, - }, - { - 'hedyhli/outline.nvim', - config = function() require("outline").setup() end, - }, -}) -- cgit v1.3