From d02b2a6f40712003685f13d80345f5ccb83fdb45 Mon Sep 17 00:00:00 2001 From: Rue Coimbra <69476182+Nikodemos0612@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:46:12 -0300 Subject: [PATCH] Added support for git commands and changed the defaut colors to Catppuccin. Also changed some key bindings so it works better with my colemack config. --- init.lua | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/init.lua b/init.lua index b98ffc61..763a9e95 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` @@ -159,7 +159,7 @@ vim.o.inccommand = 'split' vim.o.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. -vim.o.scrolloff = 10 +vim.o.scrolloff = 15 -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), -- instead raise a dialog asking if you wish to save the current file(s) @@ -194,10 +194,11 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- Use CTRL+ to switch between windows -- -- See `:help wincmd` for a list of all window commands -vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- TODO: this is not working because I use colemack and Ctrl + neio is already being used by my alacritty config. I need to configure it soon. +vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) -- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes -- vim.keymap.set("n", "", "H", { desc = "Move window to the left" }) @@ -283,12 +284,7 @@ require('lazy').setup({ }, }, }, - - -- NOTE: Plugins can also be configured to run Lua code when they are loaded. - -- - -- This is often very useful to both group configuration, as well as handle - -- lazy loading plugins that don't need to be loaded immediately at startup. - -- + { 'tpope/vim-fugitive' }, -- For example, in the following configuration, we use: -- event = 'VimEnter' -- @@ -671,10 +667,11 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, + clangd = {}, -- gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + rust_analyzer = {}, + sourcekit = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -717,6 +714,10 @@ require('lazy').setup({ vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code }) + + ensure_installed = vim.tbl_filter(function(server_name) + return server_name ~= 'sourcekit' + end, ensure_installed) require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-lspconfig').setup { @@ -881,20 +882,23 @@ 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', + transparent_background = true, + integrations = { + treesitter = 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, },