diff --git a/init.lua b/init.lua index 4eae8e7d95a..ffc92b3488c 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.opt` @@ -102,7 +102,8 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true + +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -189,6 +190,9 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- NvimTree Toggle +vim.keymap.set('n', '', ':NvimTreeToggle', { noremap = true, silent = true }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -380,15 +384,14 @@ require('lazy').setup({ -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` require('telescope').setup { - -- You can put your default mappings / updates / etc. in here - -- All the info you're looking for is in `:help telescope.setup()` - -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, - -- pickers = {} + defaults = { + preview = { + hide_on_startup = false, + }, + previewer = true, + file_ignore_patterns = {}, + path_display = { "truncate" }, + }, extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown(), @@ -838,24 +841,61 @@ require('lazy').setup({ end, }, - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- 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', - priority = 1000, -- Make sure to load this before all the other start plugins. - init = function() - -- 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' - - -- You can configure highlights by doing something like: - vim.cmd.hi 'Comment gui=none' + -- { -- You can easily change to a different colorscheme. + -- -- Change the name of the colorscheme plugin below, and then + -- -- 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', + -- priority = 1000, -- Make sure to load this before all the other start plugins. + -- init = function() + -- -- 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' + + -- -- You can configure highlights by doing something like: + -- vim.cmd.hi 'Comment gui=none' + -- end, + -- }, + -- + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + config = function() + require("catppuccin").setup({ + flavour = "mocha", -- latte, frappe, macchiato, mocha + background = { -- :h background + dark = "mocha", + }, + transparent_background = true, -- disables setting the background color + term_colors = true, -- sets terminal colors + styles = { + comments = { "italic" }, + conditionals = { "italic" }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + }, + color_overrides = { + mocha = { + base = "#000000", -- Set the background to pure black + mantle = "#000000", + crust = "#000000", + }, + }, + }) + vim.cmd.colorscheme "catppuccin" end, - }, - +}, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -931,18 +971,18 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps - - -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + -- require 'kickstart.plugins.neo-tree', -- shows context of current line + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + + -- NOTE: The import below cantomatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..100c7769095 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,69 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + -- Other plugins... + + -- Add nvim-tree plugin + { + 'nvim-tree/nvim-tree.lua', + dependencies = { 'nvim-tree/nvim-web-devicons' }, -- For file icons + config = function() + require('nvim-tree').setup { + disable_netrw = true, -- Disable netrw + hijack_netrw = true, -- Hijack netrw for nvim-tree + view = { + side = 'right', -- Position of the tree + width = 40, + }, + renderer = { + icons = { + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + }, + }, + }, + diagnostics = { + enable = true, -- Show diagnostic info + icons = { + hint = '', + info = '', + warning = '', + error = '', + }, + }, + git = { + enable = true, -- Show git status + }, + filters = { + dotfiles = false, -- Show hidden files + }, + } + end, + }, + + -- Add lazygit.nvim plugin + { + 'kdheepak/lazygit.nvim', + dependencies = { 'nvim-lua/plenary.nvim' }, + cmd = { 'LazyGit' }, + keys = { + { 'gg', 'LazyGit', desc = 'Open LazyGit' }, + }, + }, + + -- Aerial plugin to see document signatures + { + 'stevearc/aerial.nvim', + cmd = { 'AerialToggle' }, + keys = { + { 'ga', 'AerialToggle', desc = 'Toggle Aerial Outline' }, + }, + config = function() + require('aerial').setup() + end, + }, +}