🚀feat!: Add astral.nvim
- Remove rootiest.nvim plugin - Implements astral.nvim
This commit is contained in:
@@ -53,3 +53,5 @@
|
|||||||
-- ---------------------------------- LAZY -------------------------------------
|
-- ---------------------------------- LAZY -------------------------------------
|
||||||
-- Load Lazy package manager and plugins
|
-- Load Lazy package manager and plugins
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
|
|
||||||
|
require("config.rootiest").setup()
|
||||||
|
|||||||
@@ -1,42 +1,6 @@
|
|||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
-- -------------------------------- AUTOCMDS -----------------------------------
|
-- -------------------------------- AUTOCMDS -----------------------------------
|
||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
-- Autosave Colorscheme
|
|
||||||
-- When the colorscheme changes, store the name in .colorscheme
|
|
||||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
|
||||||
desc = "Store colorscheme name",
|
|
||||||
callback = function()
|
|
||||||
print("colorscheme:", vim.g.colors_name)
|
|
||||||
vim.fn.writefile(
|
|
||||||
{ vim.g.colors_name },
|
|
||||||
vim.fn.stdpath("config") .. "/.colorscheme"
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Define cursor color/icon based on mode
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
|
||||||
autocmd({ "ModeChanged", "BufEnter" }, {
|
|
||||||
callback = function()
|
|
||||||
local current_mode = vim.fn.mode()
|
|
||||||
if current_mode == "n" then
|
|
||||||
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8aa8f3" })
|
|
||||||
vim.fn.sign_define("smoothcursor", { text = "" })
|
|
||||||
elseif current_mode == "v" then
|
|
||||||
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
|
|
||||||
vim.fn.sign_define("smoothcursor", { text = "" })
|
|
||||||
elseif current_mode == "V" then
|
|
||||||
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
|
|
||||||
vim.fn.sign_define("smoothcursor", { text = "" })
|
|
||||||
elseif current_mode == "�" then
|
|
||||||
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" })
|
|
||||||
vim.fn.sign_define("smoothcursor", { text = "" })
|
|
||||||
elseif current_mode == "i" then
|
|
||||||
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#9bd482" })
|
|
||||||
vim.fn.sign_define("smoothcursor", { text = "" })
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- GIT CONFLICT MARKERS
|
-- GIT CONFLICT MARKERS
|
||||||
-- if there are conflicts, jump to first conflict, highlight conflict markers,
|
-- if there are conflicts, jump to first conflict, highlight conflict markers,
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
-- -----------------------------------------------------------------------------
|
||||||
|
-- ------------------------------- SpellCheck ----------------------------------
|
||||||
|
-- -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- Define dictionary autocorrections
|
||||||
|
vim.keymap.set("ia", "teh", "the")
|
||||||
|
vim.keymap.set("ia", "accomodate", "accommodate")
|
||||||
|
vim.keymap.set("ia", "acommodate", "accommodate")
|
||||||
|
vim.keymap.set("ia", "aparent", "apparent")
|
||||||
|
vim.keymap.set("ia", "aparrent", "apparent")
|
||||||
|
vim.keymap.set("ia", "apparant", "apparent")
|
||||||
|
vim.keymap.set("ia", "apparrent", "apparent")
|
||||||
|
vim.keymap.set("ia", "aquire", "acquire")
|
||||||
|
vim.keymap.set("ia", "becuase", "because")
|
||||||
|
vim.keymap.set("ia", "cauhgt", "caught")
|
||||||
|
vim.keymap.set("ia", "choosen", "chosen")
|
||||||
|
vim.keymap.set("ia", "cieling", "ceiling")
|
||||||
|
vim.keymap.set("ia", "collegue", "teammate")
|
||||||
|
vim.keymap.set("ia", "concensus", "consensus")
|
||||||
|
vim.keymap.set("ia", "contians", "contains")
|
||||||
|
vim.keymap.set("ia", "cosnt", "const")
|
||||||
|
vim.keymap.set("ia", "dervied", "derived")
|
||||||
|
vim.keymap.set("ia", "fales", "false")
|
||||||
|
vim.keymap.set("ia", "fasle", "false")
|
||||||
|
vim.keymap.set("ia", "fitler", "filter")
|
||||||
|
vim.keymap.set("ia", "flase", "false")
|
||||||
|
vim.keymap.set("ia", "foward", "forward")
|
||||||
|
vim.keymap.set("ia", "frequecy", "frequency")
|
||||||
|
vim.keymap.set("ia", "gaurantee", "guarantee")
|
||||||
|
vim.keymap.set("ia", "guaratee", "guarantee")
|
||||||
|
vim.keymap.set("ia", "heigth", "height")
|
||||||
|
vim.keymap.set("ia", "heirarchy", "hierarchy")
|
||||||
|
vim.keymap.set("ia", "inclued", "include")
|
||||||
|
vim.keymap.set("ia", "interator", "iterator")
|
||||||
|
vim.keymap.set("ia", "intput", "input")
|
||||||
|
vim.keymap.set("ia", "invliad", "invalid")
|
||||||
|
vim.keymap.set("ia", "lenght", "length")
|
||||||
|
vim.keymap.set("ia", "liasion", "liaison")
|
||||||
|
vim.keymap.set("ia", "libary", "library")
|
||||||
|
vim.keymap.set("ia", "listner", "listener")
|
||||||
|
vim.keymap.set("ia", "looses:", "loses")
|
||||||
|
vim.keymap.set("ia", "looup", "lookup")
|
||||||
|
vim.keymap.set("ia", "manefist", "manifest")
|
||||||
|
vim.keymap.set("ia", "namesapce", "namespace")
|
||||||
|
vim.keymap.set("ia", "namespcae", "namespace")
|
||||||
|
vim.keymap.set("ia", "occassion", "occasion")
|
||||||
|
vim.keymap.set("ia", "occured", "occurred")
|
||||||
|
vim.keymap.set("ia", "ouptut", "output")
|
||||||
|
vim.keymap.set("ia", "ouput", "output")
|
||||||
|
vim.keymap.set("ia", "overide", "override")
|
||||||
|
vim.keymap.set("ia", "postion", "position")
|
||||||
|
vim.keymap.set("ia", "priviledge", "privilege")
|
||||||
|
vim.keymap.set("ia", "psuedo", "pseudo")
|
||||||
|
vim.keymap.set("ia", "recieve", "receive")
|
||||||
|
vim.keymap.set("ia", "refered", "referred")
|
||||||
|
vim.keymap.set("ia", "relevent", "relevant")
|
||||||
|
vim.keymap.set("ia", "retreive", "retrieve")
|
||||||
|
vim.keymap.set("ia", "sloder", "solder")
|
||||||
|
vim.keymap.set("ia", "sheild", "shield")
|
||||||
|
vim.keymap.set("ia", "garbarge", "garbage")
|
||||||
|
vim.keymap.set("ia", "oposite", "opposite")
|
||||||
|
vim.keymap.set("ia", "oportunity", "opportunity")
|
||||||
|
vim.keymap.set("ia", "retreive", "retrieve")
|
||||||
|
vim.keymap.set("ia", "vegitarien", "vegetarian")
|
||||||
|
vim.keymap.set("ia", "vegatarian", "vegetarian")
|
||||||
|
vim.keymap.set("ia", "vegeterian", "vegetarian")
|
||||||
|
vim.keymap.set("ia", "vegatarien", "vegetarian")
|
||||||
|
vim.keymap.set("ia", "vegeterien", "vegetarian")
|
||||||
@@ -8,7 +8,7 @@ local substitute_loaded, substitute = pcall(require, "substitute")
|
|||||||
local codesnap_loaded = pcall(require, "codesnap")
|
local codesnap_loaded = pcall(require, "codesnap")
|
||||||
local icon_picker_loaded = pcall(require, "icon-picker")
|
local icon_picker_loaded = pcall(require, "icon-picker")
|
||||||
local gist_loaded = pcall(require, "gist")
|
local gist_loaded = pcall(require, "gist")
|
||||||
local rootiest = require("rootiest")
|
local rootiest = require("config.rootiest")
|
||||||
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.add({
|
wk.add({
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
|||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
{ import = "config.rootiest" }, -- Rootiest Plugin
|
|
||||||
{ import = "plugins" }, -- General Plugins
|
{ import = "plugins" }, -- General Plugins
|
||||||
},
|
},
|
||||||
defaults = { lazy = false, version = false },
|
defaults = { lazy = false, version = false },
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
-- -----------------------------------------------------------------------------
|
||||||
|
-- --------------------------------- NEOVIDE -----------------------------------
|
||||||
|
-- -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- Set GUI font
|
||||||
|
vim.opt.guifont = "Iosevka:#e-subpixelantialias:h12"
|
||||||
|
-- refresh rate and translucency
|
||||||
|
vim.g.neovide_refresh_rate = 170
|
||||||
|
vim.g.neovide_transparency = 0.85
|
||||||
|
vim.g.neovide_window_blurred = true
|
||||||
|
-- cursor fx
|
||||||
|
vim.g.neovide_cursor_vfx_mode = "railgun"
|
||||||
|
vim.g.neovide_cursor_smooth_blink = true
|
||||||
|
vim.g.neovide_cursor_vfx_particle_density = 16.0
|
||||||
|
vim.g.neovide_cursor_vfx_particle_lifetime = 1.6
|
||||||
|
vim.g.neovide_cursor_vfx_particle_phase = 1.2
|
||||||
|
vim.g.neovide_cursor_vfx_particle_curl = 1.0
|
||||||
|
vim.g.neovide_cursor_animation_length = 0.13
|
||||||
|
vim.g.neovide_cursor_trail_size = 0.8
|
||||||
|
-- floating shadow
|
||||||
|
vim.g.neovide_floating_shadow = true
|
||||||
|
vim.g.neovide_floating_z_height = 10
|
||||||
|
vim.g.neovide_light_angle_degrees = 45
|
||||||
|
vim.g.neovide_light_radius = 5
|
||||||
|
-- scaling
|
||||||
|
vim.g.neovide_scale_factor = 1.0
|
||||||
|
-- padding
|
||||||
|
vim.g.neovide_padding_top = 0
|
||||||
|
vim.g.neovide_padding_bottom = 0
|
||||||
|
vim.g.neovide_padding_right = 0
|
||||||
|
vim.g.neovide_padding_left = 0
|
||||||
|
|
||||||
|
-- Simulate kitty copy-and-paste from system clipboard
|
||||||
|
-- in normal mode
|
||||||
|
vim.cmd(":nnoremap <silent> <C-v> :r !xsel -b<cr>")
|
||||||
|
vim.cmd(":nnoremap <silent> <C-c> :w !xsel -i -b<cr>")
|
||||||
|
-- and in visual mode
|
||||||
|
vim.cmd(":vnoremap <silent> <C-v> :r !xsel -b<cr>")
|
||||||
|
vim.cmd(":vnoremap <silent> <C-c> :w !xsel -i -b<cr>")
|
||||||
|
-- and in command mode
|
||||||
|
vim.cmd(":cnoremap <silent> <C-v> <C-r>+")
|
||||||
|
vim.cmd(":cnoremap <silent> <C-c> <C-r>+")
|
||||||
|
-- and in insert mode
|
||||||
|
vim.cmd(":inoremap <silent> <C-v> <C-r>+")
|
||||||
|
vim.cmd(":inoremap <silent> <C-c> <C-r>+")
|
||||||
@@ -7,3 +7,9 @@
|
|||||||
vim.g.loaded_perl_provider = 0
|
vim.g.loaded_perl_provider = 0
|
||||||
-- Prefer basedpyright
|
-- Prefer basedpyright
|
||||||
vim.g.lazyvim_python_lsp = "basedpyright"
|
vim.g.lazyvim_python_lsp = "basedpyright"
|
||||||
|
-- --------------------------------- ROOTIEST -----------------------------------
|
||||||
|
vim.g.aitool = "codeium"
|
||||||
|
vim.g.usewakatime = true
|
||||||
|
vim.g.usehardtime = false
|
||||||
|
vim.g.useimage = true
|
||||||
|
vim.o.background = "dark"
|
||||||
|
|||||||
+130
-4
@@ -1,4 +1,130 @@
|
|||||||
return {
|
local M = {}
|
||||||
"rootiest/rootiest.nvim",
|
|
||||||
config = true,
|
local precog_first_time = true
|
||||||
}
|
|
||||||
|
-- Yank line without leading/trailing whitespace
|
||||||
|
function M.yank_line()
|
||||||
|
vim.api.nvim_feedkeys("_v$hy$", "n", true)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Check if the terminal is Kitty
|
||||||
|
function M.using_kitty()
|
||||||
|
local term = os.getenv("TERM") or ""
|
||||||
|
return term:find("kitty") ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Toggle the precognition plugin
|
||||||
|
function M.toggle_precognition()
|
||||||
|
if pcall(require, "precognition") then
|
||||||
|
local precognition = require("precognition")
|
||||||
|
if precog_first_time then
|
||||||
|
precognition.toggle()
|
||||||
|
precognition.toggle() -- Call toggle twice
|
||||||
|
precog_first_time = false
|
||||||
|
else
|
||||||
|
precognition.toggle() -- Call toggle once
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.api.nvim_err_writeln("precognition plugin is not installed")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Toggle Hardtime and Precognition
|
||||||
|
function M.toggle_hardmode()
|
||||||
|
if pcall(require, "hardtime") then
|
||||||
|
local hardtime = require("hardtime")
|
||||||
|
hardtime.toggle()
|
||||||
|
M.toggle_precognition()
|
||||||
|
else
|
||||||
|
vim.api.nvim_err_writeln("hardtime plugin is not installed")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Toggle LazyGit terminal
|
||||||
|
function M.toggle_lazygit_term()
|
||||||
|
if pcall(require, "toggleterm.terminal") then
|
||||||
|
local Terminal = require("toggleterm.terminal").Terminal
|
||||||
|
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
||||||
|
lazygit:toggle()
|
||||||
|
else
|
||||||
|
vim.api.nvim_err_writeln("toggleterm plugin is not installed")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Load remote-nvim plugin
|
||||||
|
function M.load_remote()
|
||||||
|
if pcall(require, "remote-nvim") then
|
||||||
|
---@diagnostic disable-next-line: missing-parameter
|
||||||
|
require("remote-nvim").setup()
|
||||||
|
vim.cmd("RemoteStart")
|
||||||
|
else
|
||||||
|
vim.api.nvim_err_writeln("remote-nvim plugin is not installed")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set cursor icons
|
||||||
|
function M.set_cursor_icons()
|
||||||
|
vim.fn.sign_define("smoothcursor_n", { text = "" })
|
||||||
|
vim.fn.sign_define("smoothcursor_v", { text = "" })
|
||||||
|
vim.fn.sign_define("smoothcursor_V", { text = "" })
|
||||||
|
vim.fn.sign_define("smoothcursor_i", { text = "" })
|
||||||
|
vim.fn.sign_define("smoothcursor_c", { text = "" })
|
||||||
|
vim.fn.sign_define("smoothcursor_R", { text = "" })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Evaluate dependencies and print warnings if needed
|
||||||
|
function M.eval_dependencies()
|
||||||
|
local function should_suppress_warnings()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function check_executable(executable)
|
||||||
|
if vim.fn.executable(executable) ~= 1 then
|
||||||
|
vim.api.nvim_notify(
|
||||||
|
executable .. " is not installed!",
|
||||||
|
vim.log.levels.WARN,
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not should_suppress_warnings() then
|
||||||
|
local executables =
|
||||||
|
{ "lazygit", "gh", "rg", "fzf", "fd", "git", "luarocks" }
|
||||||
|
for _, executable in ipairs(executables) do
|
||||||
|
check_executable(executable)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Evaluate Neovide settings
|
||||||
|
function M.eval_neovide()
|
||||||
|
if vim.g.neovide then
|
||||||
|
require("config.neovide")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Define autocorrections
|
||||||
|
function M.define_autocorrections()
|
||||||
|
require("config.autospell")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Define user commands
|
||||||
|
function M.define_commands()
|
||||||
|
vim.api.nvim_create_user_command("Q", function()
|
||||||
|
vim.cmd.qall()
|
||||||
|
end, { force = true, desc = "Close all buffers" })
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("YankLine", function()
|
||||||
|
M.yank_line()
|
||||||
|
end, { force = true, desc = "Yank line without leading whitespace" })
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
M.eval_dependencies()
|
||||||
|
M.eval_neovide()
|
||||||
|
M.define_autocorrections()
|
||||||
|
M.define_commands()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"rootiest/astral.nvim",
|
||||||
|
version = "*",
|
||||||
|
--opts = { restore_colors = true },
|
||||||
|
}
|
||||||
@@ -1,25 +1,24 @@
|
|||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
-- --------------------------------- CODING ------------------------------------
|
-- --------------------------------- CODING ------------------------------------
|
||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
local rootiest = require("rootiest")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ -- Codeium
|
{ -- Codeium
|
||||||
import = "lazyvim.plugins.extras.coding.codeium",
|
import = "lazyvim.plugins.extras.coding.codeium",
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootiest.using_aitool("codeium")
|
return vim.g.aitool == "codeium"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- Copilot
|
{ -- Copilot
|
||||||
import = "lazyvim.plugins.extras.coding.copilot",
|
import = "lazyvim.plugins.extras.coding.copilot",
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootiest.using_aitool("copilot")
|
return vim.g.aitool == "copilot"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- Tabnine
|
{ -- Tabnine
|
||||||
import = "lazyvim.plugins.extras.coding.tabnine",
|
import = "lazyvim.plugins.extras.coding.tabnine",
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootiest.using_aitool("tabnine")
|
return vim.g.aitool == "tabnine"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- Minuet-AI
|
{ -- Minuet-AI
|
||||||
@@ -29,7 +28,7 @@ return {
|
|||||||
require("minuet").setup({ provider = "openai" })
|
require("minuet").setup({ provider = "openai" })
|
||||||
end,
|
end,
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootiest.using_aitool("minuet")
|
return vim.g.aitool == "minuet"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- Yanky
|
{ -- Yanky
|
||||||
|
|||||||
+10
-89
@@ -1,8 +1,6 @@
|
|||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
-- --------------------------------- EDITOR ------------------------------------
|
-- --------------------------------- EDITOR ------------------------------------
|
||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
local rootiest = require("rootiest")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ -- Edgy
|
{ -- Edgy
|
||||||
import = "lazyvim.plugins.extras.ui.edgy",
|
import = "lazyvim.plugins.extras.ui.edgy",
|
||||||
@@ -30,6 +28,16 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
opts = {
|
||||||
|
scope = { show_start = true, show_end = true },
|
||||||
|
indent = {
|
||||||
|
char = "⋯",
|
||||||
|
tab_char = "⋯",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{ -- Outline
|
{ -- Outline
|
||||||
import = "lazyvim.plugins.extras.editor.outline",
|
import = "lazyvim.plugins.extras.editor.outline",
|
||||||
},
|
},
|
||||||
@@ -169,93 +177,6 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
---@diagnostic disable-next-line: missing-parameter
|
---@diagnostic disable-next-line: missing-parameter
|
||||||
require("smoothcursor").setup()
|
require("smoothcursor").setup()
|
||||||
-- Define last cursor position icon
|
|
||||||
vim.fn.sign_define("smoothcursor_n", { text = "" })
|
|
||||||
vim.fn.sign_define("smoothcursor_v", { text = " " })
|
|
||||||
vim.fn.sign_define("smoothcursor_V", { text = "" })
|
|
||||||
vim.fn.sign_define("smoothcursor_i", { text = "" })
|
|
||||||
vim.fn.sign_define("smoothcursor_�", { text = "" })
|
|
||||||
vim.fn.sign_define("smoothcursor_R", { text = "" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ -- Hlchunk
|
|
||||||
"shellRaining/hlchunk.nvim",
|
|
||||||
event = "BufEnter",
|
|
||||||
config = function()
|
|
||||||
local cb = function()
|
|
||||||
if vim.g.colors_name == "tokyonight" then
|
|
||||||
return "#806d9c"
|
|
||||||
elseif vim.g.colors_name:find("catppuccin") then
|
|
||||||
local catpalette = require("catppuccin.palettes").get_palette()
|
|
||||||
return catpalette.teal
|
|
||||||
elseif vim.g.colors_name == "monochrome" or "github_dark" then
|
|
||||||
return "#CCCCCC"
|
|
||||||
elseif vim.g.colors_name == "gruvbox" then
|
|
||||||
return "#a9b665"
|
|
||||||
elseif vim.g.colors_name == "dracula" or "eldritch" then
|
|
||||||
return "#50fa7b"
|
|
||||||
elseif vim.g.colors_name == "onedark" or "nightfox" then
|
|
||||||
return "#98C379"
|
|
||||||
elseif vim.g.colors_name == "nord" then
|
|
||||||
return "#81A1C1"
|
|
||||||
elseif vim.g.colors_name == "kanagawa" then
|
|
||||||
return "#73C8AD"
|
|
||||||
elseif vim.g.colors_name == "everforest" then
|
|
||||||
return "#8FBCBB"
|
|
||||||
elseif vim.g.colors_name == "github_light" or "paper" then
|
|
||||||
return "#3f3f5a"
|
|
||||||
elseif vim.g.colors_name == "neofusion" then
|
|
||||||
return "#420ADD"
|
|
||||||
else
|
|
||||||
return "#7581FF"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local common_config = {
|
|
||||||
chunk = {
|
|
||||||
style = {
|
|
||||||
{ fg = cb },
|
|
||||||
},
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enable = true,
|
|
||||||
use_treesitter = true,
|
|
||||||
chars = {
|
|
||||||
"․․",
|
|
||||||
"⁚⁚",
|
|
||||||
"⁖⁖",
|
|
||||||
"⁘⁘",
|
|
||||||
"⁙⁙",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
if vim.o.background == "dark" then
|
|
||||||
common_config.indent.style = {
|
|
||||||
{ fg = "#434437" },
|
|
||||||
{ fg = "#2f4440" },
|
|
||||||
{ fg = "#433054" },
|
|
||||||
{ fg = "#284251" },
|
|
||||||
{ fg = "#3e4451" },
|
|
||||||
{ fg = "#565c64" },
|
|
||||||
{ fg = "#6b737f" },
|
|
||||||
{ fg = "#848a91" },
|
|
||||||
}
|
|
||||||
else
|
|
||||||
common_config.indent.style = {
|
|
||||||
{ fg = "#d0b0b0" },
|
|
||||||
{ fg = "#b0b0d0" },
|
|
||||||
{ fg = "#b0d0b0" },
|
|
||||||
{ fg = "#a0a0a0" },
|
|
||||||
{ fg = "#c0c0c0" },
|
|
||||||
{ fg = "#e0e0e0" },
|
|
||||||
{ fg = "#f0f0f0" },
|
|
||||||
{ fg = "#ffffff" },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
require("hlchunk").setup(common_config)
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ return {
|
|||||||
{ -- Java
|
{ -- Java
|
||||||
import = "lazyvim.plugins.extras.lang.java",
|
import = "lazyvim.plugins.extras.lang.java",
|
||||||
},
|
},
|
||||||
{ -- Markdown-Preview
|
-- { -- Markdown-Preview
|
||||||
"iamcco/markdown-preview.nvim",
|
-- "iamcco/markdown-preview.nvim",
|
||||||
build = "cd app && yarn install",
|
-- build = "cd app && yarn install",
|
||||||
init = function()
|
-- init = function()
|
||||||
vim.g.mkdp_filetypes = { "markdown" }
|
-- vim.g.mkdp_filetypes = { "markdown" }
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,25 +90,7 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("image").setup()
|
require("image").setup()
|
||||||
end,
|
end,
|
||||||
cond = function()
|
cond = vim.g.useimage and not vim.g.neovide,
|
||||||
local function is_useimage_enabled()
|
|
||||||
local useimage_file = vim.fn.stdpath("config") .. "/.useimage"
|
|
||||||
local content = vim.fn.readfile(useimage_file)[1] or ""
|
|
||||||
content = content:lower():gsub("%s+", "") -- convert to lowercase and remove whitespace
|
|
||||||
local enable_values = { ["true"] = true, ["1"] = true, ["yes"] = true }
|
|
||||||
if enable_values[content] then
|
|
||||||
local wterm = os.getenv("TERM_PROGRAM")
|
|
||||||
local kterm = os.getenv("TERM") or ""
|
|
||||||
if wterm and wterm:find("WezTerm") then
|
|
||||||
return true -- Using WezTerm
|
|
||||||
else
|
|
||||||
return kterm:find("kitty") ~= nil -- Using Kitty
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{ -- WezTerm
|
{ -- WezTerm
|
||||||
"willothy/wezterm.nvim",
|
"willothy/wezterm.nvim",
|
||||||
|
|||||||
+10
-3
@@ -1,7 +1,7 @@
|
|||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
-- --------------------------------- THEMES ------------------------------------
|
-- --------------------------------- THEMES ------------------------------------
|
||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
local rootiest = require("rootiest")
|
local astral = require("astral")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- ----------------------- Themes --------------------------
|
-- ----------------------- Themes --------------------------
|
||||||
@@ -12,6 +12,13 @@ return {
|
|||||||
{ -- Catppuccin
|
{ -- Catppuccin
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
lazy = false, -- Override
|
lazy = false, -- Override
|
||||||
|
integrations = {
|
||||||
|
indent_blankline = {
|
||||||
|
enabled = true,
|
||||||
|
scope_color = "lavender",
|
||||||
|
colored_indent_levels = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Ayu
|
{ -- Ayu
|
||||||
"Shatur/neovim-ayu",
|
"Shatur/neovim-ayu",
|
||||||
@@ -74,13 +81,13 @@ return {
|
|||||||
set_dark_mode = function()
|
set_dark_mode = function()
|
||||||
vim.o.background = "dark"
|
vim.o.background = "dark"
|
||||||
vim.cmd.colorscheme(
|
vim.cmd.colorscheme(
|
||||||
rootiest.colortheme or "catppuccin-frappe" or "tokyonight"
|
astral.colortheme or "catppuccin-frappe" or "tokyonight"
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
set_light_mode = function()
|
set_light_mode = function()
|
||||||
vim.o.background = "light"
|
vim.o.background = "light"
|
||||||
vim.cmd.colorscheme(
|
vim.cmd.colorscheme(
|
||||||
rootiest.colortheme or "catppuccin-latte" or "tokyonight-day"
|
astral.colortheme or "catppuccin-latte" or "tokyonight-day"
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-26
@@ -21,20 +21,7 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- Wakatime
|
{ -- Wakatime
|
||||||
"wakatime/vim-wakatime",
|
"wakatime/vim-wakatime",
|
||||||
cond = function()
|
cond = vim.g.usewakatime,
|
||||||
local function is_wakatime_enabled()
|
|
||||||
local wakatime_file = vim.fn.stdpath("config") .. "/.wakatime"
|
|
||||||
local content = vim.fn.readfile(wakatime_file)[1] or ""
|
|
||||||
content = content:lower():gsub("%s+", "") -- convert to lowercase and remove whitespace
|
|
||||||
local enable_values = { ["true"] = true, ["1"] = true, ["yes"] = true }
|
|
||||||
if enable_values[content] then
|
|
||||||
return { enabled = true }
|
|
||||||
else
|
|
||||||
return { enabled = false }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return is_wakatime_enabled()
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{ -- Link following
|
{ -- Link following
|
||||||
"chrishrb/gx.nvim",
|
"chrishrb/gx.nvim",
|
||||||
@@ -129,18 +116,7 @@ return {
|
|||||||
"m4xshen/hardtime.nvim",
|
"m4xshen/hardtime.nvim",
|
||||||
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
||||||
opts = function()
|
opts = function()
|
||||||
local function is_hardtime_enabled()
|
return { enabled = vim.g.usehardtime }
|
||||||
local hardtime_file = vim.fn.stdpath("config") .. "/.hardtime"
|
|
||||||
local content = vim.fn.readfile(hardtime_file)[1] or ""
|
|
||||||
content = content:lower():gsub("%s+", "") -- convert to lowercase and remove whitespace
|
|
||||||
local enable_values = { ["true"] = true, ["1"] = true, ["yes"] = true }
|
|
||||||
if enable_values[content] then
|
|
||||||
return { enabled = true }
|
|
||||||
else
|
|
||||||
return { enabled = false }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return is_hardtime_enabled()
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- GitLinker
|
{ -- GitLinker
|
||||||
|
|||||||
Reference in New Issue
Block a user