dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

commit 5ecdeb4cc0eb171537e181877a7ccf30c75f6a5e
parent 04ac575d5a64ca4270d5dfc82b5b827cc7d409a1
Author: Jake Koroman <jakekoroman@proton.me>
Date:   Mon, 16 Sep 2024 10:08:20 -0400

neovim stuff.

Diffstat:
M.config/nvim/init.lua | 36+++++++++---------------------------
M.config/nvim/lua/keybinds.lua | 4+---
M.config/nvim/lua/plugins.lua | 36++++++++++++++++++------------------
M.config/nvim/lua/settings.lua | 10+---------
4 files changed, 29 insertions(+), 57 deletions(-)

diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua @@ -6,37 +6,19 @@ local api = vim.api -- Auto save when running :make api.nvim_create_autocmd({ "QuickFixCmdPre" }, { - callback = function() - vim.cmd ":w" - end, + callback = function() + vim.cmd ":w" + end, }) require('nvim-highlight-colors').setup {} --- Tree sitter settings --- require'nvim-treesitter.configs'.setup { --- -- A list of parser names, or "all" --- ensure_installed = { "c", "cpp", "lua", "python" }, - --- -- Install parsers synchronously (only applied to `ensure_installed`) --- sync_install = false, - --- -- Automatically install missing parsers when entering buffer --- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally --- auto_install = true, - --- highlight = { --- -- `false` will disable the whole extension --- enable = true, --- }, --- } - -- Snippet settings require('snippets').snippets = { - _global = { - todo = "/* TODO(jake): $0 */"; - note = "/* NOTE(jake): $0 */"; - inc = "#include <$0>"; - incq = "#include \"$0\""; - } + _global = { + todo = "/* TODO(jake): $0 */"; + note = "/* NOTE(jake): $0 */"; + inc = "#include <$0>"; + incq = "#include \"$0\""; + } } diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua @@ -1,7 +1,7 @@ local snippets = require('snippets') local change_scale_factor = function(delta) - vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta + vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta end -- General Editor binds @@ -30,8 +30,6 @@ vim.keymap.set('n', '<leader>wm', '<CMD>only<CR>') vim.keymap.set('n', '<M-o>', '<C-w>w') vim.keymap.set('n', '<leader>wc', '<CMD>close<CR>') --- Move line up and down in NORMAL and VISUAL modes --- Reference: https://vim.fandom.com/wiki/Moving_lines_up_or_down vim.keymap.set('n', '<C-j>', '<CMD>move .+1<CR>') vim.keymap.set('n', '<C-k>', '<CMD>move .-2<CR>') vim.keymap.set('v', '<C-j>', ":move '>+1<CR>gv=gv") diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua @@ -1,27 +1,27 @@ local ensure_packer = function() - local fn = vim.fn - local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' - if fn.empty(fn.glob(install_path)) > 0 then - fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) - vim.cmd [[packadd packer.nvim]] - return true - end - return false + local fn = vim.fn + local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd [[packadd packer.nvim]] + return true + end + return false end local packer_bootstrap = ensure_packer() return require('packer').startup({ - function(use) - use('wbthomason/packer.nvim') - use('nvim-lua/plenary.nvim') + function(use) + use('wbthomason/packer.nvim') + use('nvim-lua/plenary.nvim') - use('tpope/vim-commentary') - use('rhysd/clever-f.vim') + use('tpope/vim-commentary') + use('rhysd/clever-f.vim') - use('norcalli/snippets.nvim') - use('zekzekus/menguless') - use('brenoprata10/nvim-highlight-colors') - use ('Tetralux/odin.vim') - end + use('norcalli/snippets.nvim') + use('zekzekus/menguless') + use('brenoprata10/nvim-highlight-colors') + use ('Tetralux/odin.vim') + end }) diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua @@ -7,22 +7,16 @@ g.netrw_banner = 0 g.netrw_winsize = 15 g.netrw_localcopydircmd = 'cp -r' --- o.termguicolors = true +o.termguicolors = false g.zig_fmt_autosave = 0 --- vim.cmd('set termguicolors') --- vim.cmd('colorscheme GruberDarker') vim.cmd('set wrap!') vim.cmd('set makeprg=./build.sh') o.mouse = 'a' --- o.relativenumber = true --- o.number = true --- o.expandtab = true o.tabstop = 4 o.shiftwidth = 4 o.autochdir = true -o.guifont = "Liberation Mono:h10" -- my super cool c indentation style o.cindent = true @@ -30,8 +24,6 @@ o.cino = "l1,t0,(0,:0" -- :0 will align case to the switch statement o.swapfile = false o.backup = false --- o.scrolloff = 8 osmartcase = true - o.clipboard = 'unnamedplus'