From 797071b4aab5e5d46aaf68fb0b8db42eb052a9f1 Mon Sep 17 00:00:00 2001 From: Vanessa Roque Date: Sat, 27 Dec 2025 21:39:22 -0500 Subject: [PATCH] latest update --- .gitignore | 1 - TEST | 5 +++++ init.lua | 59 ++++++++++++++++++++++++++++++++++++++------------ lazy-lock.json | 25 +++++++++++++++++++++ 4 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 TEST create mode 100644 lazy-lock.json diff --git a/.gitignore b/.gitignore index 005b535b..8a192cab 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/TEST b/TEST new file mode 100644 index 00000000..812b3ae0 --- /dev/null +++ b/TEST @@ -0,0 +1,5 @@ + + where TEST is a filename that does not exist yet. Verify that you see + + `:'<,'>w TEST`{vim} + diff --git a/init.lua b/init.lua index b98ffc61..b56e3a19 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -152,6 +152,10 @@ vim.o.splitbelow = true vim.o.list = true vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } +-- tab stop +vim.opt.tabstop = 2 +vim.opt.shiftwidth = 2 + -- Preview substitutions live, as you type! vim.o.inccommand = 'split' @@ -168,6 +172,16 @@ vim.o.confirm = true -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` +-- Enter Normal Mode +vim.keymap.set('i', 'jk', '', { noremap = true, silent = true }) + +-- Easy quit +vim.keymap.set('n', '', 'q') +-- +-- Easy save +vim.keymap.set('n', '', 'w') +-- Quick Config Edit +vim.keymap.set('n', 'ec', ':e ~/.config/nvim/init.lua') -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` @@ -185,10 +199,15 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') + +-- +vim.keymap.set('n', 'f', function() + require('conform').format() +end, { desc = 'Format file' }) -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -462,6 +481,7 @@ require('lazy').setup({ end, }, + { 'smoka7/hop.nvim' }, -- LSP Plugins { -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins @@ -490,7 +510,12 @@ require('lazy').setup({ { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by blink.cmp - 'saghen/blink.cmp', + -- Autocomplete addition to to + { 'saghen/blink.cmp', opts = { + keymap = { + [''] = { 'select_and_accept', 'fallback' }, + }, + } }, }, config = function() -- Brief aside: **What is LSP?** @@ -881,20 +906,25 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + 'catppuccin/nvim', + name = 'catppuccin', priority = 1000, -- Make sure to load this before all the other start plugins. config = function() ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments + require('catppuccin').setup { + flavour = 'mocha', -- latte, frappe, macchiato, mocha + background = { dark = 'mocha', light = 'latte' }, -- set background for light/dark mode + transparent_background = false, -- disables setting the background color + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, }, } - -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'catppuccin' end, }, @@ -940,8 +970,9 @@ require('lazy').setup({ }, { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', + branch = 'master', build = ':TSUpdate', - main = 'nvim-treesitter.configs', -- Sets main module to use for opts + main = 'nvim-treesitter.config', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000..41b40006 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,25 @@ +{ + "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" }, + "conform.nvim": { "branch": "master", "commit": "5420c4b5ea0aeb99c09cfbd4fd0b70d257b44f25" }, + "fidget.nvim": { "branch": "main", "commit": "64463022a1f2ff1318ab22a2ea4125ed9313a483" }, + "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "hop.nvim": { "branch": "master", "commit": "707049feaca9ae65abb3696eff9aefc7879e66aa" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8f1a3e6eecb638817e8999aaa16ada27cd54d867" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, + "mini.nvim": { "branch": "main", "commit": "6170f606fbdb94bf461635c47962f61dceffe496" }, + "nvim-lspconfig": { "branch": "master", "commit": "d20d83b3f24f5884da73a9fc92fdc47e778b8d0d" }, + "nvim-treesitter": { "branch": "main", "commit": "6e42d823ce0a5a76180c473c119c7677738a09d1" }, + "nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "e709d31454ee6e6157f0537f861f797bd44c0bad" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +}