From 87058187ebea8120ac32fb51e3c267778637fe0c Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Mon, 13 Jan 2025 20:52:02 -0600 Subject: [PATCH] merge init.lua and init.min.lua --- config/aristotle.nix | 3 +- config/nvim/init.lua | 1 + config/nvim/init.min.lua | 116 --------------------------------------- 3 files changed, 3 insertions(+), 117 deletions(-) delete mode 100644 config/nvim/init.min.lua diff --git a/config/aristotle.nix b/config/aristotle.nix index 5362a67..4f35683 100644 --- a/config/aristotle.nix +++ b/config/aristotle.nix @@ -104,7 +104,8 @@ ${pkgs.coreutils}/bin/ln -sf /home/usr/dots/config/neomutt/aristotle_neomuttrc /home/usr/.config/neomutt/neomuttrc mkdir -p /home/usr/.config/nvim - ${pkgs.coreutils}/bin/ln -sf /home/usr/dots/config/nvim/init.min.lua /home/usr/.config/nvim/init.lua + ${pkgs.coreutils}/bin/ln -sf /home/usr/dots/config/nvim/init.lua /home/usr/.config/nvim/init.lua + ${pkgs.coreutils}/bin/ln -sf /home/usr/dots/config/nvim/colors /home/usr/.config/nvim/colors mkdir -p /home/usr/.config/python ${pkgs.coreutils}/bin/ln -sf /home/usr/dots/config/python/pythonrc.py /home/usr/.config/python/pythonrc.py diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 78bbac2..bb0f6e2 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -140,6 +140,7 @@ require("lazy").setup({ { "octarect/telescope-menu.nvim" }, { "VonHeikemen/lsp-zero.nvim" }, { "neovim/nvim-lspconfig" }, + { "serenevoid/kiwi.nvim" }, { "hrsh7th/nvim-cmp" }, { "hrsh7th/cmp-nvim-lsp" }, { "L3MON4D3/LuaSnip" }, diff --git a/config/nvim/init.min.lua b/config/nvim/init.min.lua deleted file mode 100644 index e199c7e..0000000 --- a/config/nvim/init.min.lua +++ /dev/null @@ -1,116 +0,0 @@ --- init.min.lua - a stripped down init.vim for environments --- in which packer.nvim is inappropriate - --- helper functions {{{ -local keymapper = vim.keymap -local globals = vim.g -local opt = vim.o -local cmd = vim.cmd -function nnoremap(l, r) - keymapper.set('n', l, r) -- noremap is implied -end - -function inoremap(l, r) - keymapper.set('i', l, r) -end - -function tnoremap(l, r) - keymapper.set('t', l, r) -end --- }}} - --- custom mappings {{{ -globals.mapleader = ' ' -nnoremap(';', ':') -nnoremap(':', ';') -nnoremap('', ':') - --- source init.vim --- requires rebuilding the configuration first -nnoremap('rr', function() - cmd.source('~/.config/nvim/init.lua') -end) --- edit init.vim -nnoremap('re', function() - cmd.edit('~/dot_testing/config/nvim/init.lua') -end) --- openup netrw -nnoremap('fs', function() - cmd.Lexplore() -end) - -inoremap('qp', 'u[s1z=`]au') -inoremap("", "mZ0i`ZlA") -inoremap('jk', '') -inoremap('zz', ':w!a') - -tnoremap('', '') --- }}} - --- vim options {{{ -opt.compatible = false -opt.number = true -opt.foldmethod = 'marker' -opt.encoding = 'utf8' -opt.list = true -opt.lcs = 'tab:->,trail:_,eol:^' -opt.clipboard = 'unnamedplus' -opt.spell = true -opt.spelllang = "en_us" -opt.title = true -opt.ts = 2 -opt.sw = 2 -opt.hlsearch = true -opt.incsearch = true -opt.ignorecase = true -opt.smartcase = true -opt.inccommand = 'nosplit' -opt.hidden = true -opt.linebreak = true -opt.path = '.,/usr/include,**' -opt.statusline="%f %r%m%q%h%=%y 0x%02B %04l:%03c:%03p" -vim.api.nvim_exec("let &titlestring='%{expand(\"%:p\")}'", true) - -globals.vimtex_view_method = 'zathura' --- }}} - --- autocommands {{{ -function setTabbing(lang, width) - vim.api.nvim_create_autocmd({"Filetype"}, { - pattern = {lang}, - callback = function() - vim.bo.expandtab = true - vim.bo.tabstop = width - vim.bo.shiftwidth = width - end - }) -end - -setTabbing("python", 4) -setTabbing("htmldjango", 4) -setTabbing("javascript", 4) -setTabbing("css", 4) -setTabbing("html", 4) -setTabbing("nix", 2) - -vim.api.nvim_create_autocmd({"TermOpen"}, { - pattern = {"*"}, - callback = function() - vim.wo.number = false - end -}) - -vim.api.nvim_create_autocmd({"TermOpen"}, { - pattern = {"*"}, - command = "setlocal nospell", -}) --- }}} - --- netrw options {{{ -globals.netrw_winsize = -28 -globals.netrw_banner = 0 --- for tree view -globals.netrw_liststyle = 3 --- use previous window to open files -globals.netrw_browser_split = 4 --- }}}