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