diff --git a/init.lua b/init.lua index 40465dc5..d6b0d7ee 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: missing-fields vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' @@ -31,6 +32,13 @@ require('lazy').setup({ -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', + { + "kdheepak/lazygit.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, + -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. { @@ -43,7 +51,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', tag = 'legacy', opts = {} }, + { 'j-hui/fidget.nvim', tag = 'legacy', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -67,7 +75,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -81,144 +89,156 @@ require('lazy').setup({ changedelete = { text = '~' }, }, on_attach = function(bufnr) - vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) + vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, + { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) vim.keymap.set('n', 'gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) end, }, }, - + -- THEMESSS + -- { + -- 'navarasu/onedark.nvim', + -- priority = 1000, + -- config = function() + -- vim.cmd.colorscheme 'onedark' + -- end, + -- }, { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', + "folke/tokyonight.nvim", priority = 1000, + opts = { + style = "night" + }, config = function() - vim.cmd.colorscheme 'onedark' + vim.cmd.colorscheme 'tokyonight' end, }, { -- Set lualine as statusline 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', - }, + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'tokyonight', + component_separators = '|', + section_separators = '', }, }, + }, - { - -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help indent_blankline.txt` - opts = { - char = '┊', - show_trailing_blankline_indent = false, + -- { + -- -- Add indentation guides even on blank lines + -- 'lukas-reineke/indent-blankline.nvim', + -- -- Enable `lukas-reineke/indent-blankline.nvim` + -- -- See `:help indent_blankline.txt` + -- opts = { + -- char = '|', + -- show_trailing_blankline_indent = false, + -- }, + -- }, + + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, + + -- Fuzzy Finder (files, lsp, etc) + { + 'nvim-telescope/telescope.nvim', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + -- Only load if `make` is available. Make sure you have the system + -- requirements installed. + { + 'nvim-telescope/telescope-fzf-native.nvim', + -- NOTE: If you are having trouble with this installation, + -- refer to the README for telescope-fzf-native for more instructions. + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, }, }, + }, - -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, - - -- Fuzzy Finder (files, lsp, etc) - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - 'nvim-lua/plenary.nvim', - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - -- Only load if `make` is available. Make sure you have the system - -- requirements installed. - { - 'nvim-telescope/telescope-fzf-native.nvim', - -- NOTE: If you are having trouble with this installation, - -- refer to the README for telescope-fzf-native for more instructions. - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - end, - }, - }, + { + -- Highlight, edit, and navigate code + 'nvim-treesitter/nvim-treesitter', + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', }, + build = ':TSUpdate', + }, - { - -- Highlight, edit, and navigate code - 'nvim-treesitter/nvim-treesitter', - dependencies = { - 'nvim-treesitter/nvim-treesitter-textobjects', - }, - build = ':TSUpdate', - }, + -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart + -- These are some example plugins that I've included in the kickstart repository. + -- Uncomment any of the lines below to enable them. + -- require 'kickstart.plugins.autoformat', + -- require 'kickstart.plugins.debug', - -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart - -- These are some example plugins that I've included in the kickstart repository. - -- Uncomment any of the lines below to enable them. - -- require 'kickstart.plugins.autoformat', - -- require 'kickstart.plugins.debug', + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` + -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping + -- up-to-date with whatever is in the kickstart repo. + -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. + -- + -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins + { import = 'custom.plugins' }, +}, {}) - -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` - -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping - -- up-to-date with whatever is in the kickstart repo. - -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- - -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - -- { import = 'custom.plugins' }, - }, {}) +-- [[ Setting options ]] +-- See `:help vim.o` +-- NOTE: You can change these options as you wish! - -- [[ Setting options ]] - -- See `:help vim.o` - -- NOTE: You can change these options as you wish! +-- Set highlight on search +vim.o.hlsearch = false - -- Set highlight on search - vim.o.hlsearch = false +-- Make line numbers default +vim.wo.number = true - -- Make line numbers default - vim.wo.number = true +-- Enable mouse mode +vim.o.mouse = 'a' - -- Enable mouse mode - vim.o.mouse = 'a' +vim.o.relativenumber = true - -- Sync clipboard between OS and Neovim. - -- Remove this option if you want your OS clipboard to remain independent. - -- See `:help 'clipboard'` - vim.o.clipboard = 'unnamedplus' +-- Sync clipboard between OS and Neovim. +-- Remove this option if you want your OS clipboard to remain independent. +-- See `:help 'clipboard'` +vim.o.clipboard = 'unnamedplus' - -- Enable break indent - vim.o.breakindent = true +-- Enable break indent +vim.o.breakindent = true - -- Save undo history - vim.o.undofile = true +-- Save undo history +vim.o.undofile = true - -- Case-insensitive searching UNLESS \C or capital in search - vim.o.ignorecase = true - vim.o.smartcase = true +-- Case-insensitive searching UNLESS \C or capital in search +vim.o.ignorecase = true +vim.o.smartcase = true - -- Keep signcolumn on by default - vim.wo.signcolumn = 'yes' +-- Keep signcolumn on by default +vim.wo.signcolumn = 'yes' - -- Decrease update time - vim.o.updatetime = 250 - vim.o.timeoutlen = 300 +-- Decrease update time +vim.o.updatetime = 250 +vim.o.timeoutlen = 300 - -- Set completeopt to have a better completion experience - vim.o.completeopt = 'menuone,noselect' +-- Set completeopt to have a better completion experience +vim.o.completeopt = 'menuone,noselect' - -- NOTE: You should make sure your terminal supports this - vim.o.termguicolors = true +-- NOTE: You should make sure your terminal supports this +vim.o.termguicolors = true - -- [[ Basic Keymaps ]] +-- [[ Basic Keymaps ]] - -- Keymaps for better default experience - -- See `:help vim.keymap.set()` - vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) - vim.keymap.set({ 'n', 'v' }, '','zz') - vim.keymap.set({ 'n', 'v' }, '','zz') - vim.keymap.set({ 'n', 'v' }, 's', '') +-- Keymaps for better default experience +-- See `:help vim.keymap.set()` +vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) +vim.keymap.set({ 'n', 'v' }, '', 'zz') +vim.keymap.set({ 'n', 'v' }, '', 'zz') +vim.keymap.set({ 'n', 'v' }, 's', '') -- Remap for dealing with word wrap vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..3c928188 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,13 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + "folke/zen-mode.nvim", + opts = {} + }, + { + "folke/twilight.nvim", + opts = {} + } +}