add plugins

This commit is contained in:
Vinit Neogi 2023-10-08 23:55:49 +05:30
parent cc75c445f7
commit 47048db3b1
11 changed files with 300 additions and 45 deletions

View file

@ -86,7 +86,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',
@ -110,7 +110,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',
@ -128,16 +128,16 @@ require('lazy').setup({
-- don't override the built-in and fugitive keymaps
local gs = package.loaded.gitsigns
vim.keymap.set({'n', 'v'}, ']c', function()
vim.keymap.set({ 'n', 'v' }, ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
vim.keymap.set({'n', 'v'}, '[c', function()
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
vim.keymap.set({ 'n', 'v' }, '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
end,
},
},
@ -151,19 +151,19 @@ require('lazy').setup({
-- end,
-- },
{
-- Set lualine as statusline
'nvim-lualine/lualine.nvim',
-- See `:help lualine.txt`
opts = {
options = {
icons_enabled = false,
-- theme = 'onedark',
component_separators = '|',
section_separators = '',
},
},
},
-- {
-- -- Set lualine as statusline
-- 'nvim-lualine/lualine.nvim',
-- -- See `:help lualine.txt`
-- opts = {
-- options = {
-- icons_enabled = false,
-- -- theme = 'onedark',
-- component_separators = '|',
-- section_separators = '',
-- },
-- },
-- },
{
-- Add indentation guides even on blank lines
@ -212,7 +212,7 @@ require('lazy').setup({
-- 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.autoformat',
require 'kickstart.plugins.debug',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
@ -233,6 +233,7 @@ vim.o.hlsearch = false
-- Make line numbers default
vim.wo.number = true
vim.o.relativenumber = true
-- Enable mouse mode
vim.o.mouse = 'a'
@ -265,12 +266,44 @@ vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
vim.o.smartindent = true
vim.o.incsearch = true
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.o.updatetime = 50
-- [[ Basic Keymaps ]]
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
vim.keymap.set("x", "<leader>p", [["_dP]], { desc = "Paste without writing current text into register" })
vim.keymap.set("n", "<leader>x", '"_x', { desc = "Delete character but don't copy into register" })
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Center screen when scrolling up" })
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Center screen when scrolling down" })
vim.keymap.set("n", "n", "nzz", { desc = "Center screen when going to next search result" })
vim.keymap.set("n", "N", "Nzz", { desc = "Center screen when going to previous search result" })
vim.keymap.set("n", "t", "tzz", { desc = "Center screen when going until next search result" })
vim.keymap.set("n", "T", "Tzz", { desc = "Center screen when going until previous search result" })
-- Remap ESC key in different modes
vim.keymap.set("i", "kj", "<ESC>", { desc = "Escape when in insert mode" })
vim.keymap.set("v", "kj", "<ESC>", { desc = "Escape when in visual mode" })
vim.keymap.set("c", "kj", "<ESC>", { desc = "Escape when in change mode" })
-- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })