improve neovim lal-10
This commit is contained in:
parent
49fd493194
commit
d4e1ac9263
@ -38,6 +38,10 @@ then
|
||||
unset COLORTERM
|
||||
fi
|
||||
fi
|
||||
if [ "$TERM" = "xterm-ghostty" ]
|
||||
then
|
||||
export TERM=xterm
|
||||
fi
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# 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)
|
||||
color = color or "rose-pine-moon"
|
||||
color = color or "srcery"
|
||||
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, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
|
||||
return {
|
||||
|
||||
{
|
||||
"erikbackman/brightburn.vim",
|
||||
},
|
||||
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
opts = {},
|
||||
config = function()
|
||||
ColorMyPencils()
|
||||
end
|
||||
},
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
name = "gruvbox",
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = false,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = false,
|
||||
comments = false,
|
||||
operators = false,
|
||||
folds = false,
|
||||
},
|
||||
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,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||
transparent = true, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
styles = {
|
||||
-- Style to be applied to different syntax groups
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
comments = { italic = false },
|
||||
keywords = { italic = false },
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "dark", -- style for sidebars, see below
|
||||
floats = "dark", -- style for floating windows
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
config = function()
|
||||
require('rose-pine').setup({
|
||||
disable_background = true,
|
||||
styles = {
|
||||
italic = false,
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
-- {
|
||||
-- "folke/tokyonight.nvim",
|
||||
-- lazy = false,
|
||||
-- opts = {},
|
||||
-- config = function()
|
||||
-- ColorMyPencils()
|
||||
-- end
|
||||
-- },
|
||||
{
|
||||
"erikbackman/brightburn.vim",
|
||||
},
|
||||
{
|
||||
"srcery-colors/srcery-vim",
|
||||
},
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
name = "gruvbox",
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = false,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = false,
|
||||
comments = false,
|
||||
operators = false,
|
||||
folds = false,
|
||||
},
|
||||
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,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||
transparent = true, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
styles = {
|
||||
-- Style to be applied to different syntax groups
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
comments = { italic = false },
|
||||
keywords = { italic = false },
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "dark", -- style for sidebars, see below
|
||||
floats = "dark", -- style for floating windows
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
config = function()
|
||||
require('rose-pine').setup({
|
||||
disable_background = true,
|
||||
styles = {
|
||||
italic = false,
|
||||
},
|
||||
})
|
||||
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({
|
||||
['<C-p>'] = cmp.mapping.select_prev_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(),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
|
@ -56,6 +56,7 @@ return {
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>")
|
||||
vim.keymap.set("n", "<leader>o", "<cmd>NvimTreeFindFileToggle<CR>")
|
||||
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("n", "J", "mzJ`z")
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
-- vim.keymap.set("n", "<C-d>", "<C-d>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", "<leader>zig", "<cmd>LspRestart<cr>")
|
||||
|
@ -145,7 +145,7 @@ set relativenumber
|
||||
nnoremap <silent> <leader>nn :set relativenumber!<CR>
|
||||
|
||||
let no_buffers_menu=1
|
||||
colorscheme gruvbox
|
||||
colorscheme Czar
|
||||
|
||||
" Better command line completion
|
||||
set wildmenu
|
||||
|
@ -1 +1 @@
|
||||
.confg/dunst
|
||||
.config/dunst
|
||||
|
Loading…
Reference in New Issue
Block a user