commit 82fa562c79afd189937fad9d57fd78faa370e3a6 Author: test Date: Sun Mar 24 16:06:51 2024 -0400 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0759fa5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +plugin/ +plugin/* +plugin/packer_compiled.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..4d1aa72 --- /dev/null +++ b/init.lua @@ -0,0 +1 @@ +require("locker98") diff --git a/lua/locker98/init.lua b/lua/locker98/init.lua new file mode 100644 index 0000000..ed8169e --- /dev/null +++ b/lua/locker98/init.lua @@ -0,0 +1,2 @@ +require("locker98.remap") +require("locker98.set") diff --git a/lua/locker98/packer.lua b/lua/locker98/packer.lua new file mode 100644 index 0000000..3439c0f --- /dev/null +++ b/lua/locker98/packer.lua @@ -0,0 +1,50 @@ +-- This file can be loaded by calling `lua require('plugins')` from your init.vim + +-- Only required if you have packer configured as `opt` +vim.cmd [[packadd packer.nvim]] + +return require('packer').startup(function(use) + -- Packer can manage itself + use 'wbthomason/packer.nvim' + + use { + 'nvim-telescope/telescope.nvim', branch = '0.1.x', + requires = { {'nvim-lua/plenary.nvim'} } + } + use('nvim-treesitter/nvim-treesitter', {run = 'TSUpdate'}) + use({ + 'rose-pine/neovim', + as = 'rose-pine', + config = function() + vim.cmd('colorscheme rose-pine') + end + }) + use('nvim-treesitter/playground') + use('mbbill/undotree') + use('theprimeagen/harpoon') + use("David-Kunz/gen.nvim") + use('tpope/vim-fugitive') + use { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v3.x', + requires = { + --- Uncomment the two plugins below if you want to manage the language servers from neovim + {'williamboman/mason.nvim'}, + {'williamboman/mason-lspconfig.nvim'}, + + -- LSP Support + {'neovim/nvim-lspconfig'}, + -- Autocompletion + {'hrsh7th/nvim-cmp'}, + {'hrsh7th/cmp-nvim-lsp'}, + {'L3MON4D3/LuaSnip'}, + -- Other + {'hrsh7th/cmp-buffer'}, + {'hrsh7th/cmp-path'}, + {'hrsh7th/cmp-nvim-lua'}, + {'saadparwaiz1/cmp_luasnip'}, + {'saadparwaiz1/cmp_luasnip'} + } + } +end) + diff --git a/lua/locker98/remap.lua b/lua/locker98/remap.lua new file mode 100644 index 0000000..467d541 --- /dev/null +++ b/lua/locker98/remap.lua @@ -0,0 +1,49 @@ +-- add leader key +vim.g.mapleader = " " + +-- this give me a shortcut to file manager +vim.keymap.set("n", "pv", vim.cmd.Ex) + +-- this allows me to move entyer code blocks up and down +vim.keymap.set("v", "J", ":m '>+1gv=gv") +vim.keymap.set("v", "K", ":m '<-2gv=gv") + + +-- append the line below to the end of the current line +vim.keymap.set("n", "J", "mxJ`x") + +-- jump up and down half a page at a time +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "", "zz") + +-- forces search terms to stay in the middle +vim.keymap.set("n", "n", "nzzzv") +vim.keymap.set("n", "N", "Nzzzv") + +-- remaps jj to Escape +vim.keymap.set('i', "jj", "") + +-- allows you to paste over without over writing current buffer +vim.keymap.set("x", "p", "\"_dP") + +-- yank to system clipboard +vim.keymap.set("n", "y", "\"+y") +vim.keymap.set("n", "Y", "\"+Y") + +-- delete to null buffer +vim.keymap.set({"n", "v"}, "d", "\"_d") + +-- quick fix +vim.keymap.set("n", "", "cnextzz") +vim.keymap.set("n", "", "cprevzz") +vim.keymap.set("n", "k", "lnextzz") +vim.keymap.set("n", "j", "lprevzz") + +-- quick find an replace on heighlighted word +vim.keymap.set("n", "s", ":%s/\\<\\>//gI") + + +-- chmod -x current file +vim.keymap.set("n", "x", "!chmod +x %", {silent = true}) + + diff --git a/lua/locker98/set.lua b/lua/locker98/set.lua new file mode 100644 index 0000000..1542f0b --- /dev/null +++ b/lua/locker98/set.lua @@ -0,0 +1,47 @@ + +-- add fat cursor to vim +-- vim.opt.guicursor = "" + +-- add line numbers and make them relative +vim.opt.nu = true +vim.opt.relativenumber = true + + +-- fix indenting in vim and make indents 4 spaces +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +-- enable smart indenting +vim.opt.smartindent = true + +-- disable word wrap +vim.opt.wrap = false + +-- disable backup and add long for undo file +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + + +-- remove perminate search highliting and add incrementall search +vim.opt.hlsearch = false +vim.opt.incsearch = true + +-- make sure we get all terminal color goodness +vim.opt.termguicolors = true + +-- add minimum view for scrolling so when you scroll in a file their is always at least 8 lines of code viewable +vim.opt.scrolloff = 8 +vim.opt.signcolumn = "yes" +vim.opt.isfname:append("@-@") + +-- set refresh rate to 50 times +vim.opt.updatetime = 50 + + +-- adds color column +vim.opt.colorcolumn = "80" +