From d93d8dd49ff7503269d1d989611b6effcb22bf32 Mon Sep 17 00:00:00 2001 From: judokasarin Date: Sun, 3 Mar 2024 15:05:19 +0530 Subject: [PATCH] aking it my own --- init.lua | 65 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 3f537328..92e0265a 100644 --- a/init.lua +++ b/init.lua @@ -99,7 +99,7 @@ vim.g.maplocalleader = ' ' vim.opt.number = true -- You can also add relative line numbers, for 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' @@ -170,10 +170,10 @@ 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!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -232,7 +232,7 @@ require('lazy').setup { -- require('Comment').setup({}) -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following lua: @@ -267,7 +267,7 @@ require('lazy').setup { -- after the plugin has been loaded: -- config = function() ... end - { -- Useful plugin to show you pending keybinds. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VeryLazy', -- Sets the loading event to 'VeryLazy' config = function() -- This is the function that runs, AFTER loading @@ -315,7 +315,7 @@ require('lazy').setup { -- Useful for getting pretty icons, but requires special font. -- If you already have a Nerd Font, or terminal set up with fallback fonts -- you can enable this - -- { 'nvim-tree/nvim-web-devicons' } + { 'nvim-tree/nvim-web-devicons' } }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -541,7 +541,7 @@ require('lazy').setup { -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`tsserver`) will work just fine - -- tsserver = {}, + tsserver = {}, -- lua_ls = { @@ -618,7 +618,7 @@ require('lazy').setup { -- -- You can use a sub-list to tell conform to run *until* a formatter -- is found. - -- javascript = { { "prettierd", "prettier" } }, + javascript = { { "prettier" } }, }, }, }, @@ -721,12 +721,37 @@ 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', - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins + 'ellisonleao/gruvbox.nvim', + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + opts = { + terminal_colors = true, -- add neovim terminal colors + undercurl = true, + underline = true, + bold = true, + italic = { + strings = true, + emphasis = true, + comments = true, + operators = false, + folds = true, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "", -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = {}, + dim_inactive = false, + transparent_mode = false, + }, config = function() -- Load the colorscheme here - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'gruvbox' + vim.o.background = 'dark' -- You can configure highlights by doing something like vim.cmd.hi 'Comment gui=none' @@ -754,6 +779,14 @@ require('lazy').setup { -- - sr)' - [S]urround [R]eplace [)] ['] require('mini.surround').setup() + + -- Add the ability to toggle comment in a code using vim like snippet. + -- + -- Examples + -- - gca) - [C]omment [A]round [)]paren + -- + require('mini.comment').setup() + -- Simple and easy statusline. -- You could remove this setup call if you don't like it, -- and try some other statusline plugin @@ -807,14 +840,14 @@ require('lazy').setup { -- 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.indent_line', -- NOTE: The import below can automatically 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. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, } -- The line beneath this is called `modeline`. See `:help modeline`