improve neovim lal-10
This commit is contained in:
parent
49fd493194
commit
d4e1ac9263
@ -38,6 +38,10 @@ then
|
|||||||
unset COLORTERM
|
unset COLORTERM
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ "$TERM" = "xterm-ghostty" ]
|
||||||
|
then
|
||||||
|
export TERM=xterm
|
||||||
|
fi
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# check the window size after each command and, if necessary,
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
return {
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||||
|
|
||||||
|
local CRThaze_Fugitive = vim.api.nvim_create_augroup("CRThaze_Fugitive", {})
|
||||||
|
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
autocmd("BufWinEnter", {
|
||||||
|
group = CRThaze_Fugitive,
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
if vim.bo.ft ~= "fugitive" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
local opts = {buffer = bufnr, remap = false}
|
||||||
|
vim.keymap.set("n", "<leader>p", function()
|
||||||
|
vim.cmd.Git('push')
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
-- rebase always
|
||||||
|
vim.keymap.set("n", "<leader>P", function()
|
||||||
|
vim.cmd.Git({'pull', '--rebase'})
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
|
||||||
|
-- needed if i did not set the branch up correctly
|
||||||
|
vim.keymap.set("n", "<leader>t", ":Git push -u origin ", opts);
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
vim.keymap.set("n", "gu", "<cmd>diffget //2<CR>")
|
||||||
|
vim.keymap.set("n", "gh", "<cmd>diffget //3<CR>")
|
||||||
|
end
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = true
|
||||||
|
-- use opts = {} for passing setup options
|
||||||
|
-- this is equivalent to setup({}) function
|
||||||
|
}
|
||||||
|
}
|
@ -1,87 +1,96 @@
|
|||||||
function ColorMyPencils(color)
|
function ColorMyPencils(color)
|
||||||
color = color or "rose-pine-moon"
|
color = color or "srcery"
|
||||||
vim.cmd.colorscheme(color)
|
vim.cmd.colorscheme(color)
|
||||||
|
|
||||||
|
if color == "srcery" then
|
||||||
|
vim.api.nvim_set_hl(0, "LineNr", { fg = "#FBB829" })
|
||||||
|
vim.api.nvim_set_hl(0, "String", { fg = "#EF2F27" })
|
||||||
|
vim.api.nvim_set_hl(0, "Comment", { fg = "#519F50" })
|
||||||
|
vim.api.nvim_set_hl(0, "Keyword", { fg = "#2C78BF" })
|
||||||
|
vim.api.nvim_set_hl(0, "Type", { fg = "#FF5F00" })
|
||||||
|
end
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
{
|
-- {
|
||||||
"erikbackman/brightburn.vim",
|
-- "folke/tokyonight.nvim",
|
||||||
},
|
-- lazy = false,
|
||||||
|
-- opts = {},
|
||||||
{
|
-- config = function()
|
||||||
"folke/tokyonight.nvim",
|
-- ColorMyPencils()
|
||||||
lazy = false,
|
-- end
|
||||||
opts = {},
|
-- },
|
||||||
config = function()
|
{
|
||||||
ColorMyPencils()
|
"erikbackman/brightburn.vim",
|
||||||
end
|
},
|
||||||
},
|
{
|
||||||
{
|
"srcery-colors/srcery-vim",
|
||||||
"ellisonleao/gruvbox.nvim",
|
},
|
||||||
name = "gruvbox",
|
{
|
||||||
config = function()
|
"ellisonleao/gruvbox.nvim",
|
||||||
require("gruvbox").setup({
|
name = "gruvbox",
|
||||||
terminal_colors = true, -- add neovim terminal colors
|
config = function()
|
||||||
undercurl = true,
|
require("gruvbox").setup({
|
||||||
underline = false,
|
terminal_colors = true, -- add neovim terminal colors
|
||||||
bold = true,
|
undercurl = true,
|
||||||
italic = {
|
underline = false,
|
||||||
strings = false,
|
bold = true,
|
||||||
emphasis = false,
|
italic = {
|
||||||
comments = false,
|
strings = false,
|
||||||
operators = false,
|
emphasis = false,
|
||||||
folds = false,
|
comments = false,
|
||||||
},
|
operators = false,
|
||||||
strikethrough = true,
|
folds = false,
|
||||||
invert_selection = false,
|
},
|
||||||
invert_signs = false,
|
strikethrough = true,
|
||||||
invert_tabline = false,
|
invert_selection = false,
|
||||||
invert_intend_guides = false,
|
invert_signs = false,
|
||||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
invert_tabline = false,
|
||||||
contrast = "", -- can be "hard", "soft" or empty string
|
invert_intend_guides = false,
|
||||||
palette_overrides = {},
|
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||||
overrides = {},
|
contrast = "", -- can be "hard", "soft" or empty string
|
||||||
dim_inactive = false,
|
palette_overrides = {},
|
||||||
transparent_mode = false,
|
overrides = {},
|
||||||
})
|
dim_inactive = false,
|
||||||
end,
|
transparent_mode = false,
|
||||||
},
|
})
|
||||||
{
|
end,
|
||||||
"folke/tokyonight.nvim",
|
},
|
||||||
config = function()
|
{
|
||||||
require("tokyonight").setup({
|
"folke/tokyonight.nvim",
|
||||||
-- your configuration comes here
|
config = function()
|
||||||
-- or leave it empty to use the default settings
|
require("tokyonight").setup({
|
||||||
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
-- your configuration comes here
|
||||||
transparent = true, -- Enable this to disable setting the background color
|
-- or leave it empty to use the default settings
|
||||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||||
styles = {
|
transparent = true, -- Enable this to disable setting the background color
|
||||||
-- Style to be applied to different syntax groups
|
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
styles = {
|
||||||
comments = { italic = false },
|
-- Style to be applied to different syntax groups
|
||||||
keywords = { italic = false },
|
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
comments = { italic = false },
|
||||||
sidebars = "dark", -- style for sidebars, see below
|
keywords = { italic = false },
|
||||||
floats = "dark", -- style for floating windows
|
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||||
},
|
sidebars = "dark", -- style for sidebars, see below
|
||||||
})
|
floats = "dark", -- style for floating windows
|
||||||
end
|
},
|
||||||
},
|
})
|
||||||
|
end
|
||||||
{
|
},
|
||||||
"rose-pine/neovim",
|
{
|
||||||
name = "rose-pine",
|
"rose-pine/neovim",
|
||||||
config = function()
|
name = "rose-pine",
|
||||||
require('rose-pine').setup({
|
config = function()
|
||||||
disable_background = true,
|
require('rose-pine').setup({
|
||||||
styles = {
|
disable_background = true,
|
||||||
italic = false,
|
styles = {
|
||||||
},
|
italic = false,
|
||||||
})
|
},
|
||||||
end
|
})
|
||||||
},
|
end
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"github/copilot.vim",
|
||||||
|
}
|
||||||
|
}
|
@ -1,38 +0,0 @@
|
|||||||
return {
|
|
||||||
"tpope/vim-fugitive",
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
|
||||||
|
|
||||||
local ThePrimeagen_Fugitive = vim.api.nvim_create_augroup("ThePrimeagen_Fugitive", {})
|
|
||||||
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
|
||||||
autocmd("BufWinEnter", {
|
|
||||||
group = ThePrimeagen_Fugitive,
|
|
||||||
pattern = "*",
|
|
||||||
callback = function()
|
|
||||||
if vim.bo.ft ~= "fugitive" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
|
||||||
local opts = {buffer = bufnr, remap = false}
|
|
||||||
vim.keymap.set("n", "<leader>p", function()
|
|
||||||
vim.cmd.Git('push')
|
|
||||||
end, opts)
|
|
||||||
|
|
||||||
-- rebase always
|
|
||||||
vim.keymap.set("n", "<leader>P", function()
|
|
||||||
vim.cmd.Git({'pull', '--rebase'})
|
|
||||||
end, opts)
|
|
||||||
|
|
||||||
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
|
|
||||||
-- needed if i did not set the branch up correctly
|
|
||||||
vim.keymap.set("n", "<leader>t", ":Git push -u origin ", opts);
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gu", "<cmd>diffget //2<CR>")
|
|
||||||
vim.keymap.set("n", "gh", "<cmd>diffget //3<CR>")
|
|
||||||
end
|
|
||||||
}
|
|
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"airblade/vim-gitgutter",
|
||||||
|
}
|
||||||
|
}
|
20
home/any/neovim/.config/nvim/lua/crthaze/lazy/lazygit.lua
Normal file
20
home/any/neovim/.config/nvim/lua/crthaze/lazy/lazygit.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
lazy = true,
|
||||||
|
cmd = {
|
||||||
|
"LazyGit",
|
||||||
|
"LazyGitConfig",
|
||||||
|
"LazyGitCurrentFile",
|
||||||
|
"LazyGitFilter",
|
||||||
|
"LazyGitFilterCurrentFile",
|
||||||
|
},
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
|
-- order to load the plugin when the command is run for the first time
|
||||||
|
keys = {
|
||||||
|
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
|
||||||
|
}
|
||||||
|
}
|
@ -135,7 +135,7 @@ return {
|
|||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||||
['<tab>'] = cmp.mapping.confirm({ select = true }),
|
['<leader><tab>'] = cmp.mapping.confirm({ select = true }),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
@ -56,6 +56,7 @@ return {
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>")
|
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>")
|
||||||
|
vim.keymap.set("n", "<leader>o", "<cmd>NvimTreeFindFileToggle<CR>")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
home/any/neovim/.config/nvim/lua/crthaze/lazy/rooter.lua
Normal file
10
home/any/neovim/.config/nvim/lua/crthaze/lazy/rooter.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"airblade/vim-rooter",
|
||||||
|
init = function()
|
||||||
|
vim.g.rooter_cd_cmd = "lcd"
|
||||||
|
vim.g.rooter_silent_chdir = 1
|
||||||
|
vim.g.rooter_resolve_links = 1
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
@ -6,8 +6,8 @@ vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
|||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
|
|
||||||
vim.keymap.set("n", "J", "mzJ`z")
|
vim.keymap.set("n", "J", "mzJ`z")
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
-- vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
-- vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
vim.keymap.set("n", "n", "nzzzv")
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
vim.keymap.set("n", "N", "Nzzzv")
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
vim.keymap.set("n", "<leader>zig", "<cmd>LspRestart<cr>")
|
vim.keymap.set("n", "<leader>zig", "<cmd>LspRestart<cr>")
|
||||||
|
@ -145,7 +145,7 @@ set relativenumber
|
|||||||
nnoremap <silent> <leader>nn :set relativenumber!<CR>
|
nnoremap <silent> <leader>nn :set relativenumber!<CR>
|
||||||
|
|
||||||
let no_buffers_menu=1
|
let no_buffers_menu=1
|
||||||
colorscheme gruvbox
|
colorscheme Czar
|
||||||
|
|
||||||
" Better command line completion
|
" Better command line completion
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
@ -1 +1 @@
|
|||||||
.confg/dunst
|
.config/dunst
|
||||||
|
Loading…
Reference in New Issue
Block a user