Updated scripts
This commit is contained in:
parent
4fa4877730
commit
cc3640996f
@ -27,6 +27,8 @@ env = XCURSOR_SIZE,24
|
|||||||
env = HYPRCURSOR_SIZE,24
|
env = HYPRCURSOR_SIZE,24
|
||||||
env = QT_QPA_PLATFORM,wayland
|
env = QT_QPA_PLATFORM,wayland
|
||||||
env = QT_QPA_PLATFORMTHEME,qt5ct # for Qt apps
|
env = QT_QPA_PLATFORMTHEME,qt5ct # for Qt apps
|
||||||
|
# env = GTK_THEME,Adwaita:dark
|
||||||
|
# env = QT_STYLE_OVERRIDE,adwaita-dark
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
### LOOK AND FEEL ###
|
### LOOK AND FEEL ###
|
||||||
@ -99,11 +101,6 @@ dwindle {
|
|||||||
permanent_direction_override = true
|
permanent_direction_override = true
|
||||||
}
|
}
|
||||||
|
|
||||||
master {
|
|
||||||
new_status = slave
|
|
||||||
mfact = 0.5
|
|
||||||
}
|
|
||||||
|
|
||||||
misc {
|
misc {
|
||||||
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||||
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
||||||
@ -235,12 +232,12 @@ windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
|
|||||||
|
|
||||||
# Terminal scratchpad
|
# Terminal scratchpad
|
||||||
windowrulev2 = float, onworkspace:special:scratchpad
|
windowrulev2 = float, onworkspace:special:scratchpad
|
||||||
windowrulev2 = size 80% 80%, onworkspace:special:scratchpad
|
windowrulev2 = size 50% 50%, onworkspace:special:scratchpad
|
||||||
workspace = special:scratchpad, on-created-empty:$terminal
|
workspace = special:scratchpad, on-created-empty:$terminal
|
||||||
|
|
||||||
# Web scratchpad
|
# Web scratchpad
|
||||||
windowrulev2 = float, onworkspace:special:web
|
windowrulev2 = float, onworkspace:special:web
|
||||||
windowrulev2 = size 80% 80%, initialTitle:^(.*Brave.*)$
|
windowrulev2 = size 50% 50%, initialTitle:^(.*Brave.*)$
|
||||||
windowrulev2 = center, initialTitle:^(.*Brave.*)$
|
windowrulev2 = center, initialTitle:^(.*Brave.*)$
|
||||||
workspace = special:web, on-created-empty:$browser
|
workspace = special:web, on-created-empty:$browser
|
||||||
windowrulev2 = size 450 253, initialTitle:^(Picture in picture)$
|
windowrulev2 = size 450 253, initialTitle:^(Picture in picture)$
|
||||||
@ -251,17 +248,17 @@ windowrulev2 = workspace e+0, initialTitle:^(Picture in picture)$
|
|||||||
|
|
||||||
# Btop
|
# Btop
|
||||||
windowrulev2 = float, onworkspace:special:btop
|
windowrulev2 = float, onworkspace:special:btop
|
||||||
windowrulev2 = size 80% 80%, onworkspace:special:btop
|
windowrulev2 = size 50% 50%, onworkspace:special:btop
|
||||||
workspace = special:btop, on-created-empty:$terminal -e btop
|
workspace = special:btop, on-created-empty:$terminal -e btop
|
||||||
|
|
||||||
# Ranger
|
# Ranger
|
||||||
windowrulev2 = float, onworkspace:special:ranger
|
windowrulev2 = float, onworkspace:special:ranger
|
||||||
windowrulev2 = size 80% 80%, onworkspace:special:ranger
|
windowrulev2 = size 50% 50%, onworkspace:special:ranger
|
||||||
workspace = special:ranger, on-created-empty:$terminal -e ranger
|
workspace = special:ranger, on-created-empty:$terminal -e ranger
|
||||||
|
|
||||||
# NMtui
|
# NMtui
|
||||||
windowrulev2 = float, onworkspace:special:nm
|
windowrulev2 = float, onworkspace:special:nm
|
||||||
windowrulev2 = size 80% 80%, onworkspace:special:nm
|
windowrulev2 = size 50% 50%, onworkspace:special:nm
|
||||||
workspace = special:nm, on-created-empty:nm-connection-editor
|
workspace = special:nm, on-created-empty:nm-connection-editor
|
||||||
|
|
||||||
# Timer
|
# Timer
|
||||||
@ -273,7 +270,7 @@ workspace = special:timer, on-created-empty:io.github.efogdev.mpris-timer
|
|||||||
windowrulev2 = size 450 253, initialTitle:^(Discord Popout)$
|
windowrulev2 = size 450 253, initialTitle:^(Discord Popout)$
|
||||||
windowrulev2 = float, onworkspace:special:discord
|
windowrulev2 = float, onworkspace:special:discord
|
||||||
windowrulev2 = float, initialTitle:^(.*Discord.*)$
|
windowrulev2 = float, initialTitle:^(.*Discord.*)$
|
||||||
windowrulev2 = size 80% 80%, initialTitle:^(.*Discord.*)$
|
windowrulev2 = size 50% 50%, initialTitle:^(.*Discord.*)$
|
||||||
workspace = special:discord, on-created-empty:flatpak run com.discordapp.Discord
|
workspace = special:discord, on-created-empty:flatpak run com.discordapp.Discord
|
||||||
windowrulev2 = workspace special:discord, initialTitle:^(.*Discord.*)$
|
windowrulev2 = workspace special:discord, initialTitle:^(.*Discord.*)$
|
||||||
windowrulev2 = opacity 1.0 0.9, initialTitle:^(Discord Popout)$
|
windowrulev2 = opacity 1.0 0.9, initialTitle:^(Discord Popout)$
|
||||||
@ -287,7 +284,7 @@ windowrulev2 = dimaround, title:^(Volume Control)$
|
|||||||
windowrulev2 = float, title:^(Helvum - Pipewire Patchbay)$
|
windowrulev2 = float, title:^(Helvum - Pipewire Patchbay)$
|
||||||
windowrulev2 = dimaround, title:^(Helvum - Pipewire Patchbay)$
|
windowrulev2 = dimaround, title:^(Helvum - Pipewire Patchbay)$
|
||||||
windowrulev2 = float, onworkspace:special:mixer
|
windowrulev2 = float, onworkspace:special:mixer
|
||||||
windowrulev2 = size 30% 50%, onworkspace:special:mixer
|
windowrulev2 = size 50% 50%, onworkspace:special:mixer
|
||||||
workspace = special:mixer, on-created-empty:pavucontrol
|
workspace = special:mixer, on-created-empty:pavucontrol
|
||||||
|
|
||||||
# # Moonlight
|
# # Moonlight
|
||||||
|
|||||||
@ -6,8 +6,13 @@ exec-once = cameractrls -d /dev/video0 -c auto_exposure=manual_mode,white_balanc
|
|||||||
exec-once = ~/Games/opentrack/build/install/bin/opentrack -platform xcb
|
exec-once = ~/Games/opentrack/build/install/bin/opentrack -platform xcb
|
||||||
|
|
||||||
# Environmental variables
|
# Environmental variables
|
||||||
env = GBM_BACKEND, nvidia-drm
|
env = LIBVA_DRIVER_NAME,nvidia
|
||||||
env = __GLX_VENDOR_LIBRARY_NAME, nvidia
|
env = XDG_SESSION_TYPE,wayland
|
||||||
|
env = GBM_BACKEND,nvidia-drm
|
||||||
|
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||||
|
env = WLR_NO_HARDWARE_CURSORS,1
|
||||||
|
env = NVIDIA_WAYLAND_USE_DISPLAYLINK,1
|
||||||
|
|
||||||
env = DXVK_HUD,fps,compiler
|
env = DXVK_HUD,fps,compiler
|
||||||
env = DXVK_CONFIG,dxgi.maxDeviceMemory=6144;cachedDynamicResources=a;
|
env = DXVK_CONFIG,dxgi.maxDeviceMemory=6144;cachedDynamicResources=a;
|
||||||
env = DXVK_ENABLE_NVAPI,1
|
env = DXVK_ENABLE_NVAPI,1
|
||||||
|
|||||||
@ -1,563 +1,167 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Settings
|
-- Settings
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
vim.g.mapleader = " "
|
vim.opt.winborder = "rounded"
|
||||||
vim.g.maplocalleader = " "
|
vim.opt.hlsearch = false
|
||||||
vim.o.hlsearch = false
|
vim.opt.tabstop = 4
|
||||||
vim.wo.number = true
|
vim.opt.cursorcolumn = false
|
||||||
vim.o.mouse = "a"
|
vim.opt.ignorecase = true
|
||||||
vim.o.breakindent = true
|
vim.opt.shiftwidth = 4
|
||||||
vim.o.undofile = true
|
vim.opt.smartindent = true
|
||||||
vim.o.ignorecase = true
|
vim.opt.number = true
|
||||||
vim.o.smartcase = true
|
vim.opt.relativenumber = true
|
||||||
vim.wo.signcolumn = "yes"
|
vim.opt.termguicolors = true
|
||||||
vim.o.termguicolors = true
|
vim.opt.undofile = true
|
||||||
vim.o.shiftwidth = 4
|
vim.opt.signcolumn = "yes"
|
||||||
vim.o.smarttab = true
|
vim.g.netrw_banner = 0 -- gets rid of the annoying banner for netrw
|
||||||
vim.o.tabstop = 4
|
vim.g.netrw_browse_split = 4 -- open in prior window
|
||||||
vim.o.expandtab = true
|
vim.g.netrw_altv = 1 -- change from left splitting to right splitting
|
||||||
vim.o.softtabstop = 4
|
vim.g.netrw_liststyle = 3 -- tree style view in netrw
|
||||||
vim.o.inccommand = "split"
|
|
||||||
vim.o.cursorline = true
|
|
||||||
vim.o.showmatch = true
|
|
||||||
vim.o.updatetime = 250
|
|
||||||
vim.o.timeoutlen = 300
|
|
||||||
vim.o.pumheight = 10
|
|
||||||
vim.o.relativenumber = true
|
|
||||||
vim.o.scrolloff = 8
|
|
||||||
vim.o.showmode = false
|
|
||||||
vim.o.showtabline = 0
|
|
||||||
vim.o.wrap = true
|
|
||||||
vim.o.foldmethod = "expr"
|
|
||||||
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
|
|
||||||
vim.o.foldlevelstart = 99
|
|
||||||
vim.o.autoread = true
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.o.clipboard = "unnamedplus"
|
|
||||||
end)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Autocommands
|
-- Autocommands
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Autoset current working directory based on closest git repo
|
-- -- show cursor line only in active window
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
-- local cursorLineGrp = vim.api.nvim_create_augroup("CursorLine", { clear = true })
|
||||||
callback = function()
|
-- vim.api.nvim_create_autocmd(
|
||||||
local git_dir = vim.fn.finddir(".git", ".;")
|
-- { "InsertLeave", "WinEnter" },
|
||||||
if git_dir ~= "" then
|
-- { pattern = "*", command = "set cursorline", group = cursorLineGrp }
|
||||||
local git_root = vim.fn.fnamemodify(git_dir, ":h")
|
-- )
|
||||||
vim.cmd("lcd " .. git_root)
|
-- vim.api.nvim_create_autocmd(
|
||||||
end
|
-- { "InsertEnter", "WinLeave" },
|
||||||
end,
|
-- { pattern = "*", command = "set nocursorline", group = cursorLineGrp }
|
||||||
})
|
-- )
|
||||||
-- show cursor line only in active window
|
-- vim.api.nvim_create_autocmd(
|
||||||
local cursorLineGrp = vim.api.nvim_create_augroup("CursorLine", { clear = true })
|
-- { "InsertLeave", "FocusGained" },
|
||||||
vim.api.nvim_create_autocmd(
|
-- { pattern = "*", command = "set cursorline", group = cursorLineGrp }
|
||||||
{ "InsertLeave", "WinEnter" },
|
-- )
|
||||||
{ pattern = "*", command = "set cursorline", group = cursorLineGrp }
|
-- vim.api.nvim_create_autocmd(
|
||||||
)
|
-- { "InsertEnter", "FocusLost" },
|
||||||
vim.api.nvim_create_autocmd(
|
-- { pattern = "*", command = "set nocursorline", group = cursorLineGrp }
|
||||||
{ "InsertEnter", "WinLeave" },
|
-- )
|
||||||
{ pattern = "*", command = "set nocursorline", group = cursorLineGrp }
|
|
||||||
)
|
|
||||||
vim.api.nvim_create_autocmd(
|
|
||||||
{ "InsertLeave", "FocusGained" },
|
|
||||||
{ pattern = "*", command = "set cursorline", group = cursorLineGrp }
|
|
||||||
)
|
|
||||||
vim.api.nvim_create_autocmd(
|
|
||||||
{ "InsertEnter", "FocusLost" },
|
|
||||||
{ pattern = "*", command = "set nocursorline", group = cursorLineGrp }
|
|
||||||
)
|
|
||||||
-- Auto update on file changes
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "CursorHoldI", "FocusGained" }, {
|
|
||||||
command = "if mode() != 'c' | checktime | endif",
|
|
||||||
pattern = { "*" },
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd(
|
|
||||||
{ "FileChangedShellPost" },
|
|
||||||
{ command = 'echohl WarningMsg | echo "File changed on disk. Buffer reloaded." | echohl None', pattern = { "*" } }
|
|
||||||
)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
-- Plugin management
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Plugin installation
|
-- Plugin installation
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
require("lazy").setup({
|
vim.pack.add({
|
||||||
|
{ src = "https://git.cmtec.se/cm/nightly_cm.nvim.git" },
|
||||||
|
{ src = "https://github.com/mrjones2014/smart-splits.nvim" },
|
||||||
|
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||||
|
{ src = "https://github.com/kdheepak/lazygit.nvim" },
|
||||||
|
{ src = "https://github.com/echasnovski/mini.icons" },
|
||||||
|
{ src = "https://github.com/echasnovski/mini.statusline" },
|
||||||
|
{ src = "https://github.com/echasnovski/mini.pick" },
|
||||||
|
{ src = 'https://github.com/neovim/nvim-lspconfig' },
|
||||||
|
{ src = 'https://github.com/lewis6991/gitsigns.nvim' },
|
||||||
|
{ src = 'https://github.com/MunifTanjim/nui.nvim' },
|
||||||
|
{ src = 'https://github.com/folke/noice.nvim' },
|
||||||
|
})
|
||||||
|
|
||||||
{
|
-------------------------------------------------------------------
|
||||||
dir = "~/linuxbox/nightly_cm.nvim",
|
-- Plugin config
|
||||||
lazy = false,
|
-------------------------------------------------------------------
|
||||||
priority = 1000,
|
-- colorscheme
|
||||||
config = function()
|
vim.cmd.colorscheme("nightly_cm")
|
||||||
vim.cmd.colorscheme("nightly_cm")
|
require "noice".setup()
|
||||||
end,
|
require "mini.pick".setup()
|
||||||
|
require "mini.statusline".setup()
|
||||||
|
require "gitsigns".setup({
|
||||||
|
signs = {
|
||||||
|
add = { text = "▎" },
|
||||||
|
change = { text = "▎" },
|
||||||
|
delete = { text = "▎" },
|
||||||
|
topdelete = { text = "▎" },
|
||||||
|
changedelete = { text = "▎" },
|
||||||
|
untracked = { text = "▎" },
|
||||||
},
|
},
|
||||||
|
preview_config = {
|
||||||
{
|
-- Options passed to nvim_open_win
|
||||||
"folke/lazydev.nvim",
|
border = "solid",
|
||||||
ft = "lua", -- only load on lua files
|
style = "minimal",
|
||||||
opts = {
|
relative = "cursor",
|
||||||
library = {
|
row = 0,
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
col = 1,
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
})
|
||||||
{
|
-------------------------------------------------------------------
|
||||||
"neovim/nvim-lspconfig",
|
-- LSP config
|
||||||
dependencies = {
|
-------------------------------------------------------------------
|
||||||
{ "j-hui/fidget.nvim", opts = {} },
|
vim.lsp.enable({ "lua_ls", "rust_analyzer", "bashls", "pyright", "marksman", "clangd", "yamlls" })
|
||||||
|
-- prevent the built-in vim.lsp.completion autotrigger from selecting the first item
|
||||||
|
vim.opt.completeopt = { "menuone", "popup", "noselect" }
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(ev)
|
||||||
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
|
if client ~= nil and client:supports_method("textDocument/completion") then
|
||||||
|
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.diagnostic.config({
|
||||||
|
severity_sort = true,
|
||||||
|
float = { border = "rounded", source = "if_many" },
|
||||||
|
underline = { severity = vim.diagnostic.severity.ERROR },
|
||||||
|
signs = {
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = " ",
|
||||||
|
[vim.diagnostic.severity.WARN] = " ",
|
||||||
|
[vim.diagnostic.severity.INFO] = " ",
|
||||||
|
[vim.diagnostic.severity.HINT] = " ",
|
||||||
},
|
},
|
||||||
config = function()
|
} or {},
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
virtual_text = {
|
||||||
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
source = "if_many",
|
||||||
callback = function(event)
|
spacing = 2,
|
||||||
local map = function(keys, func, desc, mode)
|
format = function(diagnostic)
|
||||||
mode = mode or "n"
|
local diagnostic_message = {
|
||||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||||
end
|
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
||||||
|
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
||||||
map("grn", vim.lsp.buf.rename, "[R]e[n]ame")
|
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
||||||
map("gra", vim.lsp.buf.code_action, "[G]oto Code [A]ction", { "n", "x" })
|
|
||||||
map("grr", require("fzf-lua").lsp_references, "[G]oto [R]eferences")
|
|
||||||
map("gri", require("fzf-lua").lsp_implementations, "[G]oto [I]mplementation")
|
|
||||||
map("grd", require("fzf-lua").lsp_definitions, "[G]oto [D]efinition")
|
|
||||||
|
|
||||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
|
||||||
-- For example, in C this would take you to the header.
|
|
||||||
map("grD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
|
||||||
map("gO", require("fzf-lua").lsp_document_symbols, "Open Document Symbols")
|
|
||||||
map("gW", require("fzf-lua").lsp_live_workspace_symbols, "Open Workspace Symbols")
|
|
||||||
map("grt", require("fzf-lua").lsp_typedefs, "[G]oto [T]ype Definition")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
|
||||||
severity_sort = true,
|
|
||||||
float = { border = "rounded", source = "if_many" },
|
|
||||||
underline = { severity = vim.diagnostic.severity.ERROR },
|
|
||||||
signs = {
|
|
||||||
text = {
|
|
||||||
[vim.diagnostic.severity.ERROR] = " ",
|
|
||||||
[vim.diagnostic.severity.WARN] = " ",
|
|
||||||
[vim.diagnostic.severity.INFO] = " ",
|
|
||||||
[vim.diagnostic.severity.HINT] = " ",
|
|
||||||
},
|
|
||||||
} or {},
|
|
||||||
virtual_text = {
|
|
||||||
source = "if_many",
|
|
||||||
spacing = 2,
|
|
||||||
format = function(diagnostic)
|
|
||||||
local diagnostic_message = {
|
|
||||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
|
||||||
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
|
||||||
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
|
||||||
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
|
||||||
}
|
|
||||||
return diagnostic_message[diagnostic.severity]
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
|
||||||
|
|
||||||
local servers = {
|
|
||||||
clangd = {},
|
|
||||||
html = {},
|
|
||||||
yamlls = {},
|
|
||||||
bashls = {},
|
|
||||||
pyright = {},
|
|
||||||
marksman = {},
|
|
||||||
rust_analyzer = {},
|
|
||||||
lua_ls = {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
completion = {
|
|
||||||
callSnippet = "Replace",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
return diagnostic_message[diagnostic.severity]
|
||||||
for server_name, server in pairs(servers) do
|
|
||||||
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
|
||||||
require("lspconfig")[server_name].setup(server)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
|
||||||
{
|
-------------------------------------------------------------------
|
||||||
"stevearc/conform.nvim",
|
-- Keybindings
|
||||||
opts = {
|
-------------------------------------------------------------------
|
||||||
formatters_by_ft = {
|
local map = vim.keymap.set
|
||||||
lua = { "stylua" },
|
vim.g.mapleader = " "
|
||||||
python = { "isort", "black" },
|
-- QoL bindings
|
||||||
rust = { "rustfmt", lsp_format = "fallback" },
|
map('i', 'jj', '<Esc>', { noremap = true, silent = true })
|
||||||
c = { "clang_format" },
|
map('n', '<leader>u', ':update<CR> :source<CR>', { noremap = true, silent = true })
|
||||||
cpp = { "clang_format" },
|
map('n', '<leader>w', ':write<CR>', { noremap = true, silent = true })
|
||||||
javascript = { "prettier" },
|
map('n', '<leader>q', ':quit<CR>', { noremap = true, silent = true })
|
||||||
typescript = { "prettier" },
|
map('n', '<leader>v', ':vsplit<CR>', { noremap = true, silent = true })
|
||||||
javascriptreact = { "prettier" },
|
|
||||||
typescriptreact = { "prettier" },
|
|
||||||
css = { "prettier" },
|
|
||||||
html = { "prettier" },
|
|
||||||
json = { "prettier" },
|
|
||||||
yaml = { "prettier" },
|
|
||||||
markdown = { "prettier" },
|
|
||||||
sh = { "shfmt" },
|
|
||||||
},
|
|
||||||
formatters = {
|
|
||||||
clang_format = {
|
|
||||||
prepend_args = { "--style={BasedOnStyle: LLVM, IndentWidth: 4, TabWidth: 4, UseTab: Never}" },
|
|
||||||
},
|
|
||||||
shfmt = {
|
|
||||||
prepend_args = { "-i", "4" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 3000,
|
|
||||||
lsp_format = "fallback",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
-- Git
|
||||||
"saghen/blink.cmp",
|
map('n', '<leader>g', ':LazyGitCurrentFile<CR>', { noremap = true, silent = true })
|
||||||
event = "VimEnter",
|
|
||||||
version = "1.*",
|
|
||||||
-- optional: provides snippets for the snippet source
|
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
|
||||||
--- @module 'blink.cmp'
|
|
||||||
--- @type blink.cmp.Config
|
|
||||||
opts = {
|
|
||||||
keymap = {
|
|
||||||
preset = "default",
|
|
||||||
},
|
|
||||||
|
|
||||||
appearance = {
|
-- File browser
|
||||||
nerd_font_variant = "mono",
|
map('n', '<leader>e', ':25Lex<CR>', { noremap = true, silent = true })
|
||||||
},
|
map('n', '<leader>f', ":Pick files<CR>", { noremap = true, silent = true })
|
||||||
|
map('n', '<leader>h', ":Pick help<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
completion = {
|
-- LSP
|
||||||
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
map('n', '<leader>lf', vim.lsp.buf.format, { noremap = true, silent = true })
|
||||||
},
|
|
||||||
|
|
||||||
sources = {
|
-- Global Copy/Paste
|
||||||
default = { "lsp", "buffer", "path", "snippets" },
|
map({ 'n', 'v' }, '<leader>y', '"+y', { noremap = true, silent = true })
|
||||||
},
|
map({ 'n', 'v' }, '<leader>d', '"+d', { noremap = true, silent = true })
|
||||||
|
map({ 'n', 'v' }, '<leader>c', '1z=', { noremap = true, silent = true })
|
||||||
|
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
-- Smart splits to support TMUX
|
||||||
},
|
map({ "n", "t" }, "<A-h>", require("smart-splits").resize_left, { desc = "Resize left" })
|
||||||
},
|
map({ "n", "t" }, "<A-j>", require("smart-splits").resize_down, { desc = "Resize down" })
|
||||||
|
map({ "n", "t" }, "<A-k>", require("smart-splits").resize_up, { desc = "Resize up" })
|
||||||
{
|
map({ "n", "t" }, "<A-l>", require("smart-splits").resize_right, { desc = "Resize right" })
|
||||||
"nvim-treesitter/nvim-treesitter",
|
map({ "n", "t" }, "<C-h>", require("smart-splits").move_cursor_left, { desc = "Move cursor left" })
|
||||||
build = ":TSUpdate",
|
map({ "n", "t" }, "<C-j>", require("smart-splits").move_cursor_down, { desc = "Move cursor down" })
|
||||||
main = "nvim-treesitter.configs", -- Sets main module to use for opts
|
map({ "n", "t" }, "<C-k>", require("smart-splits").move_cursor_up, { desc = "Move cursor up" })
|
||||||
opts = {
|
map({ "n", "t" }, "<C-l>", require("smart-splits").move_cursor_right, { desc = "Move cursor right" })
|
||||||
ensure_installed = {
|
map("n", "<leader><leader>h", require("smart-splits").swap_buf_left, { desc = "Swap buffer left" })
|
||||||
"bash",
|
map("n", "<leader><leader>j", require("smart-splits").swap_buf_down, { desc = "Swap buffer down" })
|
||||||
"c",
|
map("n", "<leader><leader>k", require("smart-splits").swap_buf_up, { desc = "Swap buffer up" })
|
||||||
"diff",
|
map("n", "<leader><leader>l", require("smart-splits").swap_buf_right, { desc = "Swap buffer right" })
|
||||||
"html",
|
|
||||||
"lua",
|
|
||||||
"luadoc",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"query",
|
|
||||||
"vim",
|
|
||||||
"vimdoc",
|
|
||||||
"rust",
|
|
||||||
"python",
|
|
||||||
},
|
|
||||||
auto_install = true,
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
additional_vim_regex_highlighting = { "ruby" },
|
|
||||||
},
|
|
||||||
indent = { enable = true, disable = { "ruby" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"ibhagwan/fzf-lua",
|
|
||||||
dependencies = { "echasnovski/mini.icons" },
|
|
||||||
opts = {
|
|
||||||
"telescope",
|
|
||||||
fzf_colors = {
|
|
||||||
true, -- inherit fzf colors that aren't specified below from
|
|
||||||
-- the auto-generated theme similar to `fzf_colors=true`
|
|
||||||
["fg"] = { "fg", "CursorLine" },
|
|
||||||
["bg"] = { "bg", "Normal" },
|
|
||||||
["hl"] = { "fg", "Comment" },
|
|
||||||
["fg+"] = { "fg", "Normal", "underline" },
|
|
||||||
["bg+"] = { "bg", { "CursorLine", "Normal" } },
|
|
||||||
["hl+"] = { "fg", "Statement" },
|
|
||||||
["info"] = { "fg", "PreProc" },
|
|
||||||
["prompt"] = { "fg", "Conditional" },
|
|
||||||
["pointer"] = { "fg", "Exception" },
|
|
||||||
["marker"] = { "fg", "Keyword" },
|
|
||||||
["spinner"] = { "fg", "Label" },
|
|
||||||
["header"] = { "fg", "Comment" },
|
|
||||||
["gutter"] = "-1",
|
|
||||||
},
|
|
||||||
files = {
|
|
||||||
git_icons = true, -- show git icons?
|
|
||||||
file_icons = true, -- show file icons (true|"devicons"|"mini")?
|
|
||||||
color_icons = true, -- colorize file|git icons
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"mrjones2014/smart-splits.nvim",
|
|
||||||
lazy = false,
|
|
||||||
opts = {
|
|
||||||
at_edge = "stop",
|
|
||||||
float_win_behavior = "mux",
|
|
||||||
ignored_buftypes = { "nofile", "quickfix", "prompt", "fzf" },
|
|
||||||
ignored_filetypes = { "NvimTree", "fzf" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = "nightly_cm",
|
|
||||||
component_separators = "",
|
|
||||||
section_separators = "",
|
|
||||||
globalstatus = true,
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { "mode" },
|
|
||||||
lualine_b = { "branch", "diff" },
|
|
||||||
lualine_c = { "diagnostics", "filename" },
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
function()
|
|
||||||
return vim.fn.getcwd()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
-- Lsp server name .
|
|
||||||
function()
|
|
||||||
local msg = ""
|
|
||||||
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
|
||||||
if next(clients) == nil then
|
|
||||||
return msg
|
|
||||||
end
|
|
||||||
for _, client in ipairs(clients) do
|
|
||||||
msg = msg .. client.name .. ", "
|
|
||||||
end
|
|
||||||
if msg == "" then
|
|
||||||
return msg
|
|
||||||
end
|
|
||||||
return msg:sub(1, -3)
|
|
||||||
end,
|
|
||||||
color = { fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_y = { "filetype" },
|
|
||||||
lualine_z = { "progress" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{ "echasnovski/mini.icons", version = "*", opts = {} },
|
|
||||||
{ "echasnovski/mini.pairs", version = "*", opts = {} },
|
|
||||||
{ "echasnovski/mini.surround", version = "*", opts = {} },
|
|
||||||
{
|
|
||||||
"echasnovski/mini.files",
|
|
||||||
version = "*",
|
|
||||||
opts = { mappings = {
|
|
||||||
go_n_plus = "l",
|
|
||||||
go_out = "h",
|
|
||||||
go_out_plus = "H",
|
|
||||||
} },
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"karb94/neoscroll.nvim",
|
|
||||||
opts = { duration_multiplier = 0.5 },
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/flash.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
---@type Flash.Config
|
|
||||||
opts = {},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
|
||||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
|
||||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
|
||||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
|
||||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
opts = {
|
|
||||||
signs = {
|
|
||||||
add = { text = "▎" },
|
|
||||||
change = { text = "▎" },
|
|
||||||
delete = { text = "▎" },
|
|
||||||
topdelete = { text = "▎" },
|
|
||||||
changedelete = { text = "▎" },
|
|
||||||
untracked = { text = "▎" },
|
|
||||||
},
|
|
||||||
preview_config = {
|
|
||||||
-- Options passed to nvim_open_win
|
|
||||||
border = "solid",
|
|
||||||
style = "minimal",
|
|
||||||
relative = "cursor",
|
|
||||||
row = 0,
|
|
||||||
col = 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"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 = {
|
|
||||||
{ "<C-g>", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"MeanderingProgrammer/render-markdown.nvim",
|
|
||||||
-- dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" }, -- if you use the mini.nvim suite
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, -- if you use standalone mini plugins
|
|
||||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
|
||||||
---@module 'render-markdown'
|
|
||||||
---@type render.md.UserConfig
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
|
||||||
main = "ibl",
|
|
||||||
---@module "ibl"
|
|
||||||
---@type ibl.config
|
|
||||||
opts = {
|
|
||||||
scope = {
|
|
||||||
show_end = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"norcalli/nvim-colorizer.lua",
|
|
||||||
opts = { "*" },
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
init = function()
|
|
||||||
vim.o.timeout = true
|
|
||||||
vim.o.timeoutlen = 300
|
|
||||||
end,
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
-- add any options here
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
-- OPTIONAL:
|
|
||||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
|
||||||
-- If not available, we use `mini` as the fallback
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"max397574/better-escape.nvim",
|
|
||||||
opts = { timeout = 300 },
|
|
||||||
},
|
|
||||||
|
|
||||||
{ "numToStr/Comment.nvim", opts = {} },
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}, {})
|
|
||||||
|
|
||||||
-- resizing splits
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-h>", require("smart-splits").resize_left, { desc = "Resize left" })
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-j>", require("smart-splits").resize_down, { desc = "Resize down" })
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-k>", require("smart-splits").resize_up, { desc = "Resize up" })
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-l>", require("smart-splits").resize_right, { desc = "Resize right" })
|
|
||||||
-- moving between splits
|
|
||||||
vim.keymap.set({ "n", "t" }, "<C-h>", require("smart-splits").move_cursor_left, { desc = "Move cursor left" })
|
|
||||||
vim.keymap.set({ "n", "t" }, "<C-j>", require("smart-splits").move_cursor_down, { desc = "Move cursor down" })
|
|
||||||
vim.keymap.set({ "n", "t" }, "<C-k>", require("smart-splits").move_cursor_up, { desc = "Move cursor up" })
|
|
||||||
vim.keymap.set({ "n", "t" }, "<C-l>", require("smart-splits").move_cursor_right, { desc = "Move cursor right" })
|
|
||||||
-- swapping buffers between windows
|
|
||||||
vim.keymap.set("n", "<leader><leader>h", require("smart-splits").swap_buf_left, { desc = "Swap buffer left" })
|
|
||||||
vim.keymap.set("n", "<leader><leader>j", require("smart-splits").swap_buf_down, { desc = "Swap buffer down" })
|
|
||||||
vim.keymap.set("n", "<leader><leader>k", require("smart-splits").swap_buf_up, { desc = "Swap buffer up" })
|
|
||||||
vim.keymap.set("n", "<leader><leader>l", require("smart-splits").swap_buf_right, { desc = "Swap buffer right" })
|
|
||||||
-- Yank, delete, and paste always use system clipboard
|
|
||||||
vim.keymap.set({ "n", "v" }, "y", '"+y', { noremap = true, silent = true })
|
|
||||||
vim.keymap.set({ "n", "v" }, "Y", '"+Y', { noremap = true, silent = true })
|
|
||||||
vim.keymap.set({ "n", "v" }, "d", '"+d', { noremap = true, silent = true })
|
|
||||||
-- vim.keymap.set({ 'n', 'v' }, 'x', '"+x', { noremap = true, silent = true })
|
|
||||||
vim.keymap.set({ "n", "v" }, "p", '"+p', { noremap = true, silent = true })
|
|
||||||
vim.keymap.set({ "n", "v" }, "P", '"+P', { noremap = true, silent = true })
|
|
||||||
-- Other
|
|
||||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
|
||||||
vim.keymap.set("n", "<tab>", ":tabNext<cr>", { desc = "Next tab", silent = true })
|
|
||||||
vim.keymap.set("n", "<C-s>", ":write<cr>", { desc = "Save", silent = true })
|
|
||||||
vim.keymap.set("n", "<C-q>", ":quit<cr>", { desc = "Quit", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>e", ":e .<cr>", { desc = "File explorer", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>f", ":FzfLua files<cr>", { desc = "Find file in cwd", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>F", ":FzfLua files cwd=~/<cr>", { desc = "Find file in root", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>b", ":FzfLua buffers<cr>", { desc = "Buffers", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>d", ":FzfLua lsp_document_diagnostics<cr>", { desc = "Diagnostics", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>o", ":FzfLua oldfiles<cr>", { desc = "Old file", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>g", ":FzfLua git_status<cr>", { desc = "Git status", silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>t", ":below terminal<cr>", { desc = "Terminal", silent = true })
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"workspace.checkThirdParty": false
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
---@type ChadrcConfig
|
|
||||||
local M = {}
|
|
||||||
M.ui = {theme = 'tomorrow_night'}
|
|
||||||
M.plugins = 'custom.plugins'
|
|
||||||
M.mappings = require "custom.mappings"
|
|
||||||
return M
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
|
||||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
local util = require "lspconfig/util"
|
|
||||||
local servers = { "html", "cssls", "clangd", "pyright"}
|
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
|
||||||
lspconfig[lsp].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
lspconfig.rust_analyzer.setup({
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
filetypes = {"rust"},
|
|
||||||
root_dir = util.root_pattern("Cargo.toml"),
|
|
||||||
settings = {
|
|
||||||
['rust-analyzer'] = {
|
|
||||||
cargo = {
|
|
||||||
allFeatures = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
local null_ls = require "null-ls"
|
|
||||||
|
|
||||||
local formatting = null_ls.builtins.formatting
|
|
||||||
local lint = null_ls.builtins.diagnostics
|
|
||||||
|
|
||||||
local sources = {
|
|
||||||
formatting.prettier,
|
|
||||||
formatting.stylua,
|
|
||||||
|
|
||||||
lint.shellcheck,
|
|
||||||
}
|
|
||||||
|
|
||||||
null_ls.setup {
|
|
||||||
debug = true,
|
|
||||||
sources = sources,
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.treesitter = {
|
|
||||||
ensure_installed = {
|
|
||||||
"vim",
|
|
||||||
"lua",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"tsx",
|
|
||||||
"c",
|
|
||||||
"cpp",
|
|
||||||
"rust",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"python"
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enable = true,
|
|
||||||
-- disable = {
|
|
||||||
-- "python"
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
M.mason = {
|
|
||||||
ensure_installed = {
|
|
||||||
-- lua stuff
|
|
||||||
"lua-language-server",
|
|
||||||
"stylua",
|
|
||||||
|
|
||||||
-- web dev stuff
|
|
||||||
"css-lsp",
|
|
||||||
"html-lsp",
|
|
||||||
"typescript-language-server",
|
|
||||||
"deno",
|
|
||||||
"prettier",
|
|
||||||
|
|
||||||
-- c/cpp stuff
|
|
||||||
"clangd",
|
|
||||||
"clang-format",
|
|
||||||
|
|
||||||
-- rust
|
|
||||||
"rust-analyzer",
|
|
||||||
|
|
||||||
-- python
|
|
||||||
"pyright",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- git support in nvimtree
|
|
||||||
M.nvimtree = {
|
|
||||||
git = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
renderer = {
|
|
||||||
highlight_git = true,
|
|
||||||
icons = {
|
|
||||||
show = {
|
|
||||||
git = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -1 +0,0 @@
|
|||||||
vim.g.dap_virtual_text = true
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.dap = {
|
|
||||||
plugin = true,
|
|
||||||
n = {
|
|
||||||
["<leader>db"] = { "<cmd> DapToggleBreakpoint <CR>" },
|
|
||||||
["<leader>dus"] = {
|
|
||||||
function ()
|
|
||||||
local widgets = require('dap.ui.widgets');
|
|
||||||
local sidebar = widgets.sidebar(widgets.scopes);
|
|
||||||
sidebar.open();
|
|
||||||
end,
|
|
||||||
"Open debugging sidebar"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
M.crates = {
|
|
||||||
plugin = true,
|
|
||||||
n = {
|
|
||||||
["<leader>rcu"] = {
|
|
||||||
function ()
|
|
||||||
require('crates').upgrade_all_crates()
|
|
||||||
end,
|
|
||||||
"update crates"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -1,161 +0,0 @@
|
|||||||
local overrides = require("custom.configs.overrides")
|
|
||||||
|
|
||||||
---@type NvPluginSpec[]
|
|
||||||
local plugins = {
|
|
||||||
-- Override plugin definition options
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
dependencies = {
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
config = function()
|
|
||||||
require "custom.configs.null-ls"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require "plugins.configs.lspconfig"
|
|
||||||
require "custom.configs.lspconfig"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- override plugin configs
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = overrides.mason
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = overrides.treesitter,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvim-tree/nvim-tree.lua",
|
|
||||||
opts = overrides.nvimtree,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Debugger
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
init = function()
|
|
||||||
require("core.utils").load_mappings("dap")
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
|
||||||
lazy = false,
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-dap-virtual-text").setup()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Rust
|
|
||||||
-- {
|
|
||||||
-- "simrat39/rust-tools.nvim",
|
|
||||||
-- ft = "rust",
|
|
||||||
-- dependencies = "neovim/nvim-lspconfig",
|
|
||||||
-- opts = function ()
|
|
||||||
-- return require "custom.configs.rust-tools"
|
|
||||||
-- end,
|
|
||||||
-- config = function(_, opts)
|
|
||||||
-- require('rust-tools').setup(opts)
|
|
||||||
-- end
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- {
|
|
||||||
-- 'saecki/crates.nvim',
|
|
||||||
-- ft = {"rust", "toml"},
|
|
||||||
-- config = function(_, opts)
|
|
||||||
-- local crates = require('crates')
|
|
||||||
-- crates.setup(opts)
|
|
||||||
-- require('cmp').setup.buffer({
|
|
||||||
-- sources = { { name = "crates" }}
|
|
||||||
-- })
|
|
||||||
-- crates.show()
|
|
||||||
-- require("core.utils").load_mappings("crates")
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
{
|
|
||||||
"rust-lang/rust.vim",
|
|
||||||
ft = "rust",
|
|
||||||
init = function ()
|
|
||||||
vim.g.rustfmt_autosave = 1
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Better escape (jj/jk)
|
|
||||||
{
|
|
||||||
"max397574/better-escape.nvim",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
require("better_escape").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Signatures plugin to show function signatures as you type them
|
|
||||||
{
|
|
||||||
"ray-x/lsp_signature.nvim",
|
|
||||||
event = "BufRead",
|
|
||||||
config = function()
|
|
||||||
require("lsp_signature").setup {
|
|
||||||
hint_enable = false,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- -- Rooter plugin to change directory to the project root
|
|
||||||
-- {
|
|
||||||
-- "notjedi/nvim-rooter.lua",
|
|
||||||
-- event = "UIEnter",
|
|
||||||
-- config = function()
|
|
||||||
-- require("nvim-rooter").setup {
|
|
||||||
-- rooter_patterns = { "Makefile", ".git", ".hg", ".svn" },
|
|
||||||
-- trigger_patterns = { "*" },
|
|
||||||
-- manual = false,
|
|
||||||
-- }
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- Leap plugin to jump to any line in the file
|
|
||||||
{
|
|
||||||
"ggandor/leap.nvim",
|
|
||||||
event = "UIEnter",
|
|
||||||
config = function() require("leap").add_default_mappings() end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Copilot plugin to autocomplete text
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
cmd = "Copilot",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
require("copilot").setup {
|
|
||||||
suggestion = { enabled = false },
|
|
||||||
panel = { enabled = false },
|
|
||||||
filetypes = { markdown = true },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Copilot CMP plugin to autocomplete text in the completion menu
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot-cmp",
|
|
||||||
dependencies = "zbirenbaum/copilot.lua",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function() require("copilot_cmp").setup() end,
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- "hrsh7th/nvim-cmp",
|
|
||||||
-- opts = function()
|
|
||||||
-- local M = require "plugins.configs.cmp"
|
|
||||||
-- M.completion.completeopt = "menu,menuone,noselect"
|
|
||||||
-- M.mapping["<CR>"] = cmp.mapping.confirm {
|
|
||||||
-- behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
-- select = false,
|
|
||||||
-- }
|
|
||||||
-- table.insert(M.sources, {name = "crates"})
|
|
||||||
-- return M
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
}
|
|
||||||
return plugins
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"workspace.checkThirdParty": false
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
column_width = 200
|
|
||||||
line_endings = "Unix"
|
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
quote_style = "AutoPreferDouble"
|
|
||||||
call_parentheses = "None"
|
|
||||||
collapse_simple_statement = "Always"
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Configure AstroNvim updates
|
|
||||||
updater = {
|
|
||||||
remote = "origin", -- remote to use
|
|
||||||
channel = "stable", -- "stable" or "nightly"
|
|
||||||
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
|
|
||||||
branch = "nightly", -- branch name (NIGHTLY ONLY)
|
|
||||||
commit = nil, -- commit hash (NIGHTLY ONLY)
|
|
||||||
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
|
|
||||||
skip_prompts = false, -- skip prompts about breaking changes
|
|
||||||
show_changelog = true, -- show the changelog after performing an update
|
|
||||||
auto_quit = false, -- automatically quit the current session after a successful update
|
|
||||||
remotes = { -- easily add new remotes to track
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Set colorscheme to use
|
|
||||||
colorscheme = "astrodark",
|
|
||||||
|
|
||||||
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
|
||||||
diagnostics = { virtual_text = true, underline = true },
|
|
||||||
|
|
||||||
lsp = {
|
|
||||||
-- customize lsp formatting options
|
|
||||||
formatting = {
|
|
||||||
-- control auto formatting on save
|
|
||||||
format_on_save = {
|
|
||||||
enabled = false, -- enable or disable format on save globally
|
|
||||||
allow_filetypes = { -- enable format on save for specified filetypes only
|
|
||||||
-- "go",
|
|
||||||
},
|
|
||||||
ignore_filetypes = { -- disable format on save for specified filetypes
|
|
||||||
-- "python",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
disabled = { -- disable formatting capabilities for the listed language servers
|
|
||||||
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
|
|
||||||
-- "lua_ls",
|
|
||||||
},
|
|
||||||
timeout_ms = 1000, -- default format timeout
|
|
||||||
-- filter = function(client) -- fully override the default formatting function
|
|
||||||
-- return true
|
|
||||||
-- end
|
|
||||||
},
|
|
||||||
-- enable servers that you already have installed without mason
|
|
||||||
servers = {
|
|
||||||
-- "pyright"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Configure require("lazy").setup() options
|
|
||||||
lazy = {
|
|
||||||
defaults = { lazy = true },
|
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
-- customize default disabled vim plugins
|
|
||||||
disabled_plugins = {
|
|
||||||
"tohtml",
|
|
||||||
"gzip",
|
|
||||||
"matchit",
|
|
||||||
"zipPlugin",
|
|
||||||
"netrwPlugin",
|
|
||||||
"tarPlugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- This function is run last and is a good place to configuring
|
|
||||||
-- augroups/autocommands and custom filetypes also this just pure lua so
|
|
||||||
-- anything that doesn't fit in the normal config locations above can go here
|
|
||||||
polish = function()
|
|
||||||
local rt = require "rust-tools"
|
|
||||||
|
|
||||||
rt.setup {
|
|
||||||
server = {
|
|
||||||
on_attach = function(_, bufnr)
|
|
||||||
-- Hover actions
|
|
||||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
|
||||||
-- Code action groups
|
|
||||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-- Set up custom filetypes
|
|
||||||
-- vim.filetype.add {
|
|
||||||
-- extension = {
|
|
||||||
-- foo = "fooscript",
|
|
||||||
-- },
|
|
||||||
-- filename = {
|
|
||||||
-- ["Foofile"] = "fooscript",
|
|
||||||
-- },
|
|
||||||
-- pattern = {
|
|
||||||
-- ["~/%.config/foo/.*"] = "fooscript",
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
capabilities = {
|
|
||||||
offsetEncoding = "utf-16",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
return {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
runtime = {
|
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = "LuaJIT",
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
-- Get the language server to recognize the `vim` global
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
|
||||||
},
|
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
-- Mapping data with "desc" stored directly by vim.keymap.set().
|
|
||||||
--
|
|
||||||
-- Please use this mappings table to set keyboard mapping since this is the
|
|
||||||
-- lower level configuration and more robust one. (which-key will
|
|
||||||
-- automatically pick-up stored data by this setting.)
|
|
||||||
|
|
||||||
return {
|
|
||||||
-- first key is the mode
|
|
||||||
n = {
|
|
||||||
["<leader>bD"] = {
|
|
||||||
function()
|
|
||||||
require("astronvim.utils.status").heirline.buffer_picker(function(bufnr) require("astronvim.utils.buffer").close(
|
|
||||||
bufnr) end)
|
|
||||||
end,
|
|
||||||
desc = "Pick to close",
|
|
||||||
},
|
|
||||||
|
|
||||||
["<leader>b"] = { name = "Buffers" },
|
|
||||||
["<tab>"] = { ":bnext<cr>", desc = "Next buffer tab" },
|
|
||||||
|
|
||||||
-- Open file
|
|
||||||
["<leader><space>"] = { ":Telescope find_files search_dirs=~/<cr>", desc = "Open file" },
|
|
||||||
["<leader><C-space>"] = { ":Telescope find_files search_dirs=~/ hidden=true<cr>", desc =
|
|
||||||
"Open file inc. hidden files" },
|
|
||||||
|
|
||||||
-- Make
|
|
||||||
["<leader>m"] = { name = "Make (Compile)" },
|
|
||||||
["<leader>mm"] = { ":make<cr>", desc = "Make" },
|
|
||||||
["<leader>mn"] = { ":make clean<cr>", desc = "Make clean" },
|
|
||||||
["<leader>mr"] = { ":make run<cr>", desc = "Make run" },
|
|
||||||
["<leader>mu"] = { ":make upload<cr>", desc = "Make upload" },
|
|
||||||
|
|
||||||
-- Go to source file
|
|
||||||
["gs"] = { ":ClangdSwitchSourceHeader<cr>" },
|
|
||||||
|
|
||||||
-- Format code
|
|
||||||
["<M-f>"] = { ":Format<cr>" },
|
|
||||||
["<leader>a"] = { ":lua require'rust-tools'.hover_actions.hover_actions()<cr>" },
|
|
||||||
-- Disable bindings
|
|
||||||
["<leader>n"] = false,
|
|
||||||
},
|
|
||||||
t = {
|
|
||||||
-- setting a mapping to false will disable it
|
|
||||||
-- ["<esc>"] = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
-- set vim options here (vim.<first_key>.<second_key> = value)
|
|
||||||
return {
|
|
||||||
opt = {
|
|
||||||
-- set to true or false etc.
|
|
||||||
relativenumber = true, -- sets vim.opt.relativenumber
|
|
||||||
number = true, -- sets vim.opt.number
|
|
||||||
spell = false, -- sets vim.opt.spell
|
|
||||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
|
||||||
wrap = false, -- sets vim.opt.wrap
|
|
||||||
textwidth = 200, -- sets vim.opt.textwidth
|
|
||||||
},
|
|
||||||
g = {
|
|
||||||
mapleader = " ", -- sets vim.g.mapleader
|
|
||||||
autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
|
|
||||||
cmp_enabled = true, -- enable completion at start
|
|
||||||
autopairs_enabled = true, -- enable autopairs at start
|
|
||||||
diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
|
|
||||||
icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
|
|
||||||
ui_notifications_enabled = true, -- disable notifications when toggling UI elements
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-- If you need more control, you can use the function()...end notation
|
|
||||||
-- return function(local_vim)
|
|
||||||
-- local_vim.opt.relativenumber = true
|
|
||||||
-- local_vim.g.mapleader = " "
|
|
||||||
-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
|
|
||||||
-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
|
|
||||||
--
|
|
||||||
-- return local_vim
|
|
||||||
-- end
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
return {
|
|
||||||
"AstroNvim/astrotheme",
|
|
||||||
config = function()
|
|
||||||
require("astrotheme").setup {
|
|
||||||
|
|
||||||
palettes = {
|
|
||||||
astrodark = {
|
|
||||||
-- Extend or modify astrodarks palette colors
|
|
||||||
base = "#1e1e1e",
|
|
||||||
mantle = "#181818",
|
|
||||||
crust = "#1f1f1f",
|
|
||||||
surface0 = "#252525",
|
|
||||||
surface1 = "#3e3e3e",
|
|
||||||
overlay1 = "#2c2c2c",
|
|
||||||
overlay2 = "#282828",
|
|
||||||
subtext0 = "#4b4b4b",
|
|
||||||
subtext1 = "#777777",
|
|
||||||
text = "#ababab",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
highlights = {
|
|
||||||
astrodark = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
return {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
-- override the options table that is used in the `require("cmp").setup()` call
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- opts parameter is the default options table
|
|
||||||
-- the function is lazy loaded so cmp is able to be required
|
|
||||||
local cmp = require "cmp"
|
|
||||||
-- modify the sources part of the options table
|
|
||||||
opts.sources = cmp.config.sources {
|
|
||||||
{ name = "nvim_lsp", priority = 1000 },
|
|
||||||
{ name = "luasnip", priority = 750 },
|
|
||||||
{ name = "buffer", priority = 500 },
|
|
||||||
{ name = "path", priority = 250 },
|
|
||||||
{ name = "copilot", priority = 100 },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- return the new table to be used
|
|
||||||
return opts
|
|
||||||
end,
|
|
||||||
} -- override nvim-cmp plugin
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Add the community repository of plugin specifications
|
|
||||||
-- "AstroNvim/astrocommunity",
|
|
||||||
-- example of imporing a plugin, comment out to use it or add your own
|
|
||||||
-- available plugins can be found at https://github.com/AstroNvim/astrocommunity
|
|
||||||
|
|
||||||
-- { import = "astrocommunity.colorscheme.catppuccin" },
|
|
||||||
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
|
|
||||||
}
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
return {
|
|
||||||
-- customize alpha options
|
|
||||||
{
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- customize the dashboard header
|
|
||||||
opts.section.header.val = {
|
|
||||||
" =======================================================================================================",
|
|
||||||
" -------------------------------------------------------------------------------------------------------",
|
|
||||||
" ---████████████████████-----███████████-------███████████-----████████████--████████████-████████████--",
|
|
||||||
" --█████████████████████----█████████████-----█████████████---- -- - ---",
|
|
||||||
" --██████ ██---█████ ███-----███ █████---------██-------████████-----█-------------",
|
|
||||||
" -- -------------- --- ----- --- ----- ---------██-------█------------█-------------",
|
|
||||||
" --█████--------------------█████------████-████------█████---------██-------███████████--████████████--",
|
|
||||||
" -- -------------------- ------ ------ --------- ------- -- --",
|
|
||||||
" --█████--------------------█████--------█████--------█████---------------------------------------------",
|
|
||||||
" -- -------------------- -------- -------- ---------------------------------------------",
|
|
||||||
" --██████--------------██---█████---------------------█████------------- (Neo)vim coding IDE -----------",
|
|
||||||
" --█████████████████████ ---█████---------------------█████---------------------------------------------",
|
|
||||||
" ---███████████████████ ----█████---------------------█████---------------------------------------------",
|
|
||||||
" --- ----- --------------------- ---------------------------------------------",
|
|
||||||
" -------------------------------------------------------------------------------------------------------",
|
|
||||||
" =======================================================================================================",
|
|
||||||
}
|
|
||||||
opts.section.header.opts.hl = "String"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- You can disable default plugins as follows:
|
|
||||||
-- { "max397574/better-escape.nvim", enabled = false },
|
|
||||||
--
|
|
||||||
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
|
|
||||||
-- {
|
|
||||||
-- "L3MON4D3/LuaSnip",
|
|
||||||
-- config = function(plugin, opts)
|
|
||||||
-- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
|
|
||||||
-- -- add more custom luasnip configuration such as filetype extend or custom snippets
|
|
||||||
-- local luasnip = require "luasnip"
|
|
||||||
-- luasnip.filetype_extend("javascript", { "javascriptreact" })
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- "windwp/nvim-autopairs",
|
|
||||||
-- config = function(plugin, opts)
|
|
||||||
-- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
|
|
||||||
-- -- add more custom autopairs configuration such as custom rules
|
|
||||||
-- local npairs = require "nvim-autopairs"
|
|
||||||
-- local Rule = require "nvim-autopairs.rule"
|
|
||||||
-- local cond = require "nvim-autopairs.conds"
|
|
||||||
-- npairs.add_rules(
|
|
||||||
-- {
|
|
||||||
-- Rule("$", "$", { "tex", "latex" })
|
|
||||||
-- -- don't add a pair if the next character is %
|
|
||||||
-- :with_pair(cond.not_after_regex "%%")
|
|
||||||
-- -- don't add a pair if the previous character is xxx
|
|
||||||
-- :with_pair(
|
|
||||||
-- cond.not_before_regex("xxx", 3)
|
|
||||||
-- )
|
|
||||||
-- -- don't move right when repeat character
|
|
||||||
-- :with_move(cond.none())
|
|
||||||
-- -- don't delete if the next character is xx
|
|
||||||
-- :with_del(cond.not_after_regex "xx")
|
|
||||||
-- -- disable adding a newline when you press <cr>
|
|
||||||
-- :with_cr(cond.none()),
|
|
||||||
-- },
|
|
||||||
-- -- disable for .vim files, but it work for another filetypes
|
|
||||||
-- Rule("a", "a", "-vim")
|
|
||||||
-- )
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
-- By adding to the which-key config and using our helper function you can add more which-key registered bindings
|
|
||||||
-- {
|
|
||||||
-- "folke/which-key.nvim",
|
|
||||||
-- config = function(plugin, opts)
|
|
||||||
-- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call
|
|
||||||
-- -- Add bindings which show up as group name
|
|
||||||
-- local wk = require "which-key"
|
|
||||||
-- wk.register({
|
|
||||||
-- b = { name = "Buffer" },
|
|
||||||
-- }, { mode = "n", prefix = "<leader>" })
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
}
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
return {
|
|
||||||
"onsails/lspkind.nvim",
|
|
||||||
opts = {
|
|
||||||
mode = "symbol",
|
|
||||||
symbol_map = {
|
|
||||||
NONE = "",
|
|
||||||
Array = "",
|
|
||||||
Boolean = "⊨",
|
|
||||||
Class = "",
|
|
||||||
Constructor = "",
|
|
||||||
Key = "",
|
|
||||||
Namespace = "",
|
|
||||||
Null = "NULL",
|
|
||||||
Number = "#",
|
|
||||||
Object = "⦿",
|
|
||||||
Package = "",
|
|
||||||
Property = "",
|
|
||||||
Reference = "",
|
|
||||||
Snippet = "",
|
|
||||||
String = "𝓐",
|
|
||||||
TypeParameter = "",
|
|
||||||
Unit = "",
|
|
||||||
Copilot = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"})
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
-- customize mason plugins
|
|
||||||
return {
|
|
||||||
-- use mason-lspconfig to configure LSP installations
|
|
||||||
{
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
-- overrides `require("mason-lspconfig").setup(...)`
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
|
||||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
|
||||||
"lua_ls",
|
|
||||||
"pyright",
|
|
||||||
"cssls",
|
|
||||||
"html",
|
|
||||||
"jsonls",
|
|
||||||
"clangd",
|
|
||||||
"marksman",
|
|
||||||
"bashls",
|
|
||||||
"dockerls",
|
|
||||||
"openscad_lsp",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
|
|
||||||
{
|
|
||||||
"jay-babu/mason-null-ls.nvim",
|
|
||||||
-- overrides `require("mason-null-ls").setup(...)`
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
|
||||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
|
||||||
"prettier",
|
|
||||||
"clang-format",
|
|
||||||
"black",
|
|
||||||
"flake8",
|
|
||||||
"markdownlint",
|
|
||||||
"beautysh",
|
|
||||||
"stylua",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jay-babu/mason-nvim-dap.nvim",
|
|
||||||
-- overrides `require("mason-nvim-dap").setup(...)`
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
|
||||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
|
||||||
-- "python",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
opts = function(_, config)
|
|
||||||
-- config variable is the default configuration table for the setup function call
|
|
||||||
-- local null_ls = require "null-ls"
|
|
||||||
|
|
||||||
-- Check supported formatters and linters
|
|
||||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
|
||||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
|
||||||
config.sources = {
|
|
||||||
-- Set a formatter
|
|
||||||
-- null_ls.builtins.formatting.stylua,
|
|
||||||
-- null_ls.builtins.formatting.prettier,
|
|
||||||
}
|
|
||||||
return config -- return final config table
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
|
||||||
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
|
|
||||||
"lua",
|
|
||||||
"c",
|
|
||||||
"vim",
|
|
||||||
"bash",
|
|
||||||
"json",
|
|
||||||
"yaml",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"python",
|
|
||||||
"dockerfile",
|
|
||||||
"cpp",
|
|
||||||
"rust",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Signatures plugin to show function signatures as you type them
|
|
||||||
{
|
|
||||||
"ray-x/lsp_signature.nvim",
|
|
||||||
event = "BufRead",
|
|
||||||
config = function()
|
|
||||||
require("lsp_signature").setup {
|
|
||||||
hint_enable = false,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Rooter plugin to change directory to the project root
|
|
||||||
{
|
|
||||||
"notjedi/nvim-rooter.lua",
|
|
||||||
event = "UIEnter",
|
|
||||||
config = function()
|
|
||||||
require("nvim-rooter").setup {
|
|
||||||
rooter_patterns = { "Makefile", ".git", ".hg", ".svn" },
|
|
||||||
trigger_patterns = { "*" },
|
|
||||||
manual = false,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Leap plugin to jump to any line in the file
|
|
||||||
{
|
|
||||||
"ggandor/leap.nvim",
|
|
||||||
event = "UIEnter",
|
|
||||||
config = function() require("leap").add_default_mappings() end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Copilot plugin to autocomplete text
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
cmd = "Copilot",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
require("copilot").setup {
|
|
||||||
suggestion = { enabled = false },
|
|
||||||
panel = { enabled = false },
|
|
||||||
filetypes = { markdown = true },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Copilot CMP plugin to autocomplete text in the completion menu
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot-cmp",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function() require("copilot_cmp").setup() end,
|
|
||||||
},
|
|
||||||
'simrat39/rust-tools.nvim'
|
|
||||||
}
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
[Appearance]
|
[Appearance]
|
||||||
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
|
color_scheme_path=/usr/share/qt5ct/colors/darker.conf
|
||||||
custom_palette=false
|
custom_palette=true
|
||||||
standard_dialogs=default
|
standard_dialogs=gtk3
|
||||||
style=Adwaita-Dark
|
style=Adwaita-Dark
|
||||||
|
|
||||||
[Fonts]
|
[Fonts]
|
||||||
@ -24,7 +24,7 @@ underline_shortcut=1
|
|||||||
wheel_scroll_lines=3
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
[SettingsWindow]
|
[SettingsWindow]
|
||||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x4y\0\0\x2\xdf\0\0\0\0\0\0\0\0\0\0\x4\x7f\0\0\x2\xdf\0\0\0\0\x2\0\0\0\n\0\0\0\0\0\0\0\0\0\0\0\x4y\0\0\x2\xdf)
|
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4\x1a\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4(\0\0\0\0\x2\0\0\0\xf\0\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4\x1a)
|
||||||
|
|
||||||
[Troubleshooting]
|
[Troubleshooting]
|
||||||
force_raster_widgets=1
|
force_raster_widgets=1
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[Appearance]
|
[Appearance]
|
||||||
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
|
color_scheme_path=/usr/share/qt6ct/colors/darker.conf
|
||||||
custom_palette=false
|
custom_palette=true
|
||||||
standard_dialogs=default
|
standard_dialogs=gtk3
|
||||||
style=Adwaita-Dark
|
style=Adwaita-Dark
|
||||||
|
|
||||||
[Fonts]
|
[Fonts]
|
||||||
@ -24,7 +24,7 @@ underline_shortcut=1
|
|||||||
wheel_scroll_lines=3
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
[SettingsWindow]
|
[SettingsWindow]
|
||||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x5y\0\0\x5\x9b\0\0\0\0\0\0\0\0\0\0\x5\x7f\0\0\x5\x9f\0\0\0\0\x2\0\0\0\n\0\0\0\0\0\0\0\0\0\0\0\x5y\0\0\x5\x9b)
|
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4\x1a\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4\x1a\0\0\0\0\x2\0\0\0\xf\0\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4\x1a)
|
||||||
|
|
||||||
[Troubleshooting]
|
[Troubleshooting]
|
||||||
force_raster_widgets=1
|
force_raster_widgets=1
|
||||||
|
|||||||
@ -40,7 +40,7 @@ slider,
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background: @background;
|
background: @background;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
border: 0px solid lighter(@background);
|
border: 2px solid lighter(@background);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 19px 38px rgba(0, 0, 0, 0.3),
|
0 19px 38px rgba(0, 0, 0, 0.3),
|
||||||
0 15px 12px rgba(0, 0, 0, 0.22);
|
0 15px 12px rgba(0, 0, 0, 0.22);
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
[ui.anchors]
|
[ui.anchors]
|
||||||
bottom = true
|
# bottom = true
|
||||||
left = true
|
# left = true
|
||||||
right = true
|
# right = true
|
||||||
top = true
|
# top = true
|
||||||
|
|
||||||
[ui.window]
|
[ui.window]
|
||||||
h_align = "fill"
|
h_align = "fill"
|
||||||
@ -28,15 +27,15 @@ pixel_size = 24
|
|||||||
theme = ""
|
theme = ""
|
||||||
|
|
||||||
[ui.window.box.margins]
|
[ui.window.box.margins]
|
||||||
top = 400
|
# top = 200
|
||||||
|
|
||||||
[ui.window.box.ai_scroll]
|
[ui.window.box.ai_scroll]
|
||||||
name = "aiScroll"
|
name = "aiScroll"
|
||||||
h_align = "fill"
|
h_align = "fill"
|
||||||
v_align = "fill"
|
v_align = "fill"
|
||||||
max_height = 300
|
max_height = 200
|
||||||
min_width = 400
|
min_width = 400
|
||||||
height = 300
|
height = 200
|
||||||
width = 400
|
width = 400
|
||||||
|
|
||||||
[ui.window.box.ai_scroll.margins]
|
[ui.window.box.ai_scroll.margins]
|
||||||
@ -57,8 +56,8 @@ y_align = 0
|
|||||||
wrap = true
|
wrap = true
|
||||||
|
|
||||||
[ui.window.box.scroll.list]
|
[ui.window.box.scroll.list]
|
||||||
marker_color = "#afd787"
|
marker_color = "#1BFFE1"
|
||||||
max_height = 300
|
max_height = 340
|
||||||
max_width = 400
|
max_width = 400
|
||||||
min_width = 400
|
min_width = 400
|
||||||
width = 400
|
width = 400
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2023 Alexis Corporal
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
let s:palette = v:lua.require('lightline.colorscheme.nightly')
|
|
||||||
let g:lightline#colorscheme#nightly#palette = lightline#colorscheme#fill(s:palette)
|
|
||||||
@ -1 +0,0 @@
|
|||||||
require("nightly_cm").load()
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"workspace.checkThirdParty": false
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
local nightly = {
|
|
||||||
normal = {
|
|
||||||
a = { bg = "#87afd7", fg = "#0c0c0c" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
c = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
|
|
||||||
insert = {
|
|
||||||
a = { bg = "#afd787", fg = "#0c0c0c" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
|
|
||||||
command = {
|
|
||||||
a = { bg = "#d7af5f", fg = "#0c0c0c" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
|
|
||||||
visual = {
|
|
||||||
a = { bg = "#87afd7", fg = "#0c0c0c" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
|
|
||||||
replace = {
|
|
||||||
a = { bg = "#d75f00", fg = "#0c0c0c" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
|
|
||||||
terminal = {
|
|
||||||
a = { bg = "#d7af5f", fg = "#0c0c0c" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
|
|
||||||
inactive = {
|
|
||||||
a = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
b = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
c = { bg = "#303030", fg = "#c6c6c6" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
return nightly
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local defaults = {
|
|
||||||
transparent = false,
|
|
||||||
styles = {
|
|
||||||
comments = { italic = true },
|
|
||||||
functions = { italic = false },
|
|
||||||
variables = { italic = false },
|
|
||||||
keywords = { italic = false },
|
|
||||||
},
|
|
||||||
highlights = {},
|
|
||||||
}
|
|
||||||
|
|
||||||
M.options = {}
|
|
||||||
|
|
||||||
function M.setup(options)
|
|
||||||
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.extend(options)
|
|
||||||
M.options = vim.tbl_deep_extend("force", {}, M.options or defaults, options or {})
|
|
||||||
end
|
|
||||||
|
|
||||||
M.setup()
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
local config = require "nightly_cm.config"
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.setup = config.setup
|
|
||||||
|
|
||||||
function M.load()
|
|
||||||
-- only needed to clear when not the default colorscheme
|
|
||||||
if vim.g.colors_name then
|
|
||||||
vim.cmd "hi clear"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- enable termguicolors
|
|
||||||
if vim.api.nvim_get_option "termguicolors" == false then
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.g.colors_name = "nightly_cm"
|
|
||||||
|
|
||||||
require("nightly_cm.theme").setup()
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.dark_colors = {
|
|
||||||
color0 = "#000000",
|
|
||||||
color1 = "#d75f00",
|
|
||||||
color2 = "#afd787",
|
|
||||||
color3 = "#d7af5f",
|
|
||||||
color4 = "#87afd7",
|
|
||||||
color5 = "#d7d7af",
|
|
||||||
color6 = "#87afd7",
|
|
||||||
color7 = "#c6c6c6",
|
|
||||||
color8 = "#000000",
|
|
||||||
color9 = "#d75f00",
|
|
||||||
color10 = "#afd787",
|
|
||||||
color11 = "#d7af5f",
|
|
||||||
color12 = "#87afd7",
|
|
||||||
color13 = "#d7d7af",
|
|
||||||
color14 = "#87afd7",
|
|
||||||
color15 = "#eeeeee",
|
|
||||||
color16 = "#000000",
|
|
||||||
color17 = "#585858",
|
|
||||||
color18 = "#444444",
|
|
||||||
comment = "#6c6c6c",
|
|
||||||
black = "#000000",
|
|
||||||
background = "#262626",
|
|
||||||
foreground = "#c6c6c6",
|
|
||||||
cursorline = "#303030",
|
|
||||||
iblscope = "#435466",
|
|
||||||
none = "NONE",
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -1,399 +0,0 @@
|
|||||||
local theme = {}
|
|
||||||
|
|
||||||
function theme.setup()
|
|
||||||
local options = require("nightly_cm.config").options
|
|
||||||
|
|
||||||
local p = require("nightly_cm.palette").dark_colors
|
|
||||||
|
|
||||||
if options.transparent then
|
|
||||||
p.background = "NONE"
|
|
||||||
vim.o.pumblend = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
theme.highlights = {
|
|
||||||
-- Base highlights
|
|
||||||
Boolean = { fg = p.color5 },
|
|
||||||
Character = { fg = p.color12 },
|
|
||||||
ColorColumn = { bg = p.none },
|
|
||||||
Comment = { fg = p.comment, style = options.styles.comments },
|
|
||||||
Conceal = { fg = p.color4, bg = p.background },
|
|
||||||
Conditional = { fg = p.color6 },
|
|
||||||
Constant = { fg = p.color7 },
|
|
||||||
Cursor = { fg = p.foreground, bg = p.foreground },
|
|
||||||
CursorNC = { fg = "NONE", bg = "NONE" },
|
|
||||||
CurSearch = { link = "IncSearch" },
|
|
||||||
CursorColumn = { bg = p.background },
|
|
||||||
CursorIM = { fg = p.foreground, bg = p.foreground },
|
|
||||||
CursorLine = { bg = p.cursorline },
|
|
||||||
CursorLineNr = { fg = p.foreground },
|
|
||||||
Debug = { fg = p.color1 },
|
|
||||||
Define = { fg = p.color6 },
|
|
||||||
Delimiter = { fg = p.foreground },
|
|
||||||
DiffAdd = { fg = p.color4, bg = p.background },
|
|
||||||
DiffChange = { fg = p.color5, bg = p.background },
|
|
||||||
DiffDelete = { fg = p.color1, bg = p.background },
|
|
||||||
DiffText = { fg = p.color5, bg = p.background },
|
|
||||||
Directory = { fg = p.color4 },
|
|
||||||
EndOfBuffer = { fg = p.background },
|
|
||||||
EndOfBufferNC = { fg = p.background },
|
|
||||||
Error = { fg = p.color1, bg = p.background },
|
|
||||||
ErrorMsg = { fg = p.color1, bg = p.background },
|
|
||||||
Exception = { fg = p.color6 },
|
|
||||||
Float = { fg = p.color5 },
|
|
||||||
FloatBorder = { fg = p.comment, bg = p.black },
|
|
||||||
FoldColumn = { fg = p.color4, bg = p.background },
|
|
||||||
Folded = { fg = p.color4, bg = p.background },
|
|
||||||
Function = { fg = p.color6, style = options.styles.functions },
|
|
||||||
Identifier = { fg = p.color5 },
|
|
||||||
Ignore = { fg = p.color7, bg = p.background },
|
|
||||||
IncSearch = { fg = p.black, bg = p.color10 },
|
|
||||||
Include = { fg = p.color6 },
|
|
||||||
Keyword = { fg = p.color6, style = options.styles.keywords },
|
|
||||||
Label = { fg = p.color4 },
|
|
||||||
LineNr = { fg = p.color17 },
|
|
||||||
Macro = { fg = p.color6 },
|
|
||||||
MatchParen = { bg = p.color17 },
|
|
||||||
ModeMsg = { fg = p.foreground, bg = p.background },
|
|
||||||
MoreMsg = { fg = p.color5 },
|
|
||||||
MsgArea = { fg = p.foreground, bg = p.background },
|
|
||||||
MsgSeparator = { fg = p.foreground, bg = p.background },
|
|
||||||
NonText = { fg = p.color5 },
|
|
||||||
Normal = { fg = p.foreground, bg = p.background },
|
|
||||||
NormalFloat = { bg = p.black },
|
|
||||||
NormalNC = { fg = p.foreground, bg = p.background },
|
|
||||||
Number = { fg = p.color3 },
|
|
||||||
Operator = { fg = p.color6 },
|
|
||||||
Pmenu = { fg = p.foreground, bg = p.black },
|
|
||||||
PmenuSbar = { bg = p.black },
|
|
||||||
PmenuSel = { fg = p.black, bg = p.color4 },
|
|
||||||
PmenuThumb = { bg = p.color2 },
|
|
||||||
PreCondit = { fg = p.color6 },
|
|
||||||
PreProc = { fg = p.color6 },
|
|
||||||
Question = { fg = p.color5 },
|
|
||||||
QuickFixLine = { bg = p.color2 },
|
|
||||||
Repeat = { fg = p.color6 },
|
|
||||||
Search = { fg = p.black, bg = p.color4 },
|
|
||||||
SignColumn = { fg = p.background, bg = p.background },
|
|
||||||
Special = { fg = p.color6 },
|
|
||||||
SpecialChar = { fg = p.foreground },
|
|
||||||
SpecialComment = { fg = p.color2 },
|
|
||||||
SpecialKey = { fg = p.color4 },
|
|
||||||
SpellBad = { fg = p.color2 },
|
|
||||||
SpellCap = { fg = p.color6 },
|
|
||||||
SpellLocal = { fg = p.color4 },
|
|
||||||
SpellRare = { fg = p.color6 },
|
|
||||||
Statement = { fg = p.color6 },
|
|
||||||
StatusLine = { fg = p.foreground, bg = p.background },
|
|
||||||
StStatusLine = { fg = p.foreground, bg = p.background },
|
|
||||||
Storage = { fg = p.color5 },
|
|
||||||
StorageClass = { fg = p.color7 },
|
|
||||||
String = { fg = p.color2 },
|
|
||||||
Structure = { fg = p.color6 },
|
|
||||||
Substitute = { fg = p.black, bg = p.color5 },
|
|
||||||
TabLine = { fg = p.color2, bg = p.color16 },
|
|
||||||
TabLineFill = { fg = p.foreground, bg = p.color16 },
|
|
||||||
TabLineSel = { fg = p.foreground, bg = p.background },
|
|
||||||
Tag = { fg = p.color4 },
|
|
||||||
TermCursor = { fg = p.foreground, bg = p.foreground },
|
|
||||||
TermCursorNC = { fg = p.foreground, bg = p.foreground },
|
|
||||||
Title = { fg = p.color4, bold = true },
|
|
||||||
Todo = { fg = p.color1, bg = p.background },
|
|
||||||
type = { fg = p.color5 },
|
|
||||||
typedef = { fg = p.color6 },
|
|
||||||
underlined = { fg = p.color2, underline = true },
|
|
||||||
Variable = { fg = p.color15 },
|
|
||||||
VertSplit = { fg = p.cursorline },
|
|
||||||
Visual = { bg = p.color18 },
|
|
||||||
VisualNOS = { bg = p.background },
|
|
||||||
WarningMsg = { fg = p.color3, bg = p.background },
|
|
||||||
Whitespace = { fg = p.color1 },
|
|
||||||
WildMenu = { fg = p.color7, bg = p.color4 },
|
|
||||||
lCursor = { fg = p.foreground, bg = p.foreground },
|
|
||||||
WinSeparator = { fg = p.cursorline },
|
|
||||||
-- bufferline.nvim: https://github.com/akinsho/bufferline.nvim
|
|
||||||
BufferLineFill = { fg = p.background, bg = p.background },
|
|
||||||
BufferLineIndicatorSelected = { fg = p.color2 },
|
|
||||||
|
|
||||||
-- Diagnostic
|
|
||||||
DiagnosticError = { fg = p.color1 },
|
|
||||||
DiagnosticHint = { fg = p.color2 },
|
|
||||||
DiagnosticInfo = { fg = p.color4 },
|
|
||||||
DiagnosticWarn = { fg = p.color3 },
|
|
||||||
DiagnosticUnnecessary = { fg = p.none },
|
|
||||||
|
|
||||||
-- diff
|
|
||||||
diffAdded = { fg = p.color4 },
|
|
||||||
diffChanged = { fg = p.color5 },
|
|
||||||
diffFile = { fg = p.color7 },
|
|
||||||
diffIndexLine = { fg = p.color6 },
|
|
||||||
diffLine = { fg = p.color5 },
|
|
||||||
diffNewFile = { fg = p.color5 },
|
|
||||||
diffOldFile = { fg = p.color5 },
|
|
||||||
diffRemoved = { fg = p.color1 },
|
|
||||||
|
|
||||||
-- gitsigns: https://github.com/lewis6991/gitsigns.nvim
|
|
||||||
GitSignsAdd = { fg = p.color2 },
|
|
||||||
GitSignsChange = { fg = p.color3 },
|
|
||||||
GitSignsDelete = { fg = p.color1 },
|
|
||||||
|
|
||||||
-- indent-blankline.nvim: https://github.com/lukas-reineke/indent-blankline.nvim
|
|
||||||
IblIndent = { fg = p.cursorline },
|
|
||||||
IblScope = { fg = p.color17 },
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
LspInfoFiletype = { fg = p.color15 },
|
|
||||||
LspReferenceText = { bg = p.color4 },
|
|
||||||
LspReferenceRead = { bg = p.color4 },
|
|
||||||
LspReferenceWrite = { bg = p.color4 },
|
|
||||||
LspInfoBorder = { link = "FloatBorder" },
|
|
||||||
|
|
||||||
-- lspsaga.nvim: https://github.com/glepnir/lspsaga.nvim
|
|
||||||
DefinitionCount = { fg = p.color6 },
|
|
||||||
DefinitionIcon = { fg = p.color7 },
|
|
||||||
LspFloatWinBorder = { link = "FloatBorder" },
|
|
||||||
LspFloatWinNormal = { bg = p.black },
|
|
||||||
LspSagaBorderTitle = { fg = p.color7 },
|
|
||||||
LspSagaCodeActionBorder = { link = "FloatBorder" },
|
|
||||||
LspSagaCodeActionContent = { fg = p.color6 },
|
|
||||||
LspSagaCodeActionTitle = { fg = p.color7 },
|
|
||||||
LspSagaDefPreviewBorder = {},
|
|
||||||
LspSagaFinderSelection = { fg = p.color5 },
|
|
||||||
LspSagaHoverBorder = { link = "FloatBorder" },
|
|
||||||
LspSagaRenameBorder = { link = "FloatBorder" },
|
|
||||||
LspSagaSignatureHelpBorder = { link = "FloatBorder" },
|
|
||||||
ReferencesCount = { fg = p.color6 },
|
|
||||||
ReferencesIcon = { fg = p.color7 },
|
|
||||||
TargetWord = { fg = p.color7 },
|
|
||||||
|
|
||||||
-- Neogit: https://github.com/TimUntersberger/neogit
|
|
||||||
NeogitBranch = { fg = p.color6 },
|
|
||||||
NeogitDiffAddHighlight = { fg = p.color4, bg = p.background },
|
|
||||||
NeogitDiffContextHighlight = { bg = p.background, fg = p.foreground },
|
|
||||||
NeogitDiffDeleteHighlight = { fg = p.color1, bg = p.background },
|
|
||||||
NeogitHunkHeader = { bg = p.black, fg = p.foreground },
|
|
||||||
NeogitHunkHeaderHighlight = { bg = p.comment, fg = p.color7 },
|
|
||||||
NeogitRemote = { fg = p.color6 },
|
|
||||||
|
|
||||||
-- Neovim
|
|
||||||
healthError = { fg = p.color1 },
|
|
||||||
healthSuccess = { fg = p.color4 },
|
|
||||||
healthWarning = { fg = p.color3 },
|
|
||||||
|
|
||||||
-- nvim-cmp: https://github.com/hrsh7th/nvim-cmp
|
|
||||||
CmpDocumentationBorder = { fg = p.color17, bg = p.black },
|
|
||||||
CmpItemAbbr = { fg = p.foreground, bg = "NONE" },
|
|
||||||
CmpItemAbbrDeprecated = { fg = p.color2, bg = "NONE" },
|
|
||||||
CmpItemAbbrMatch = { fg = p.color2, bg = "NONE" },
|
|
||||||
CmpItemAbbrMatchFuzzy = { fg = p.color2, bg = "NONE" },
|
|
||||||
CmpItemKind = { fg = p.color4, bg = p.black },
|
|
||||||
CmpItemMenu = { fg = p.color2, bg = "NONE" },
|
|
||||||
CmpItemKindFolder = { fg = p.color4 },
|
|
||||||
CmpItemKindFile = { fg = p.color2 },
|
|
||||||
CmpItemKindConstructor = { fg = p.color5 },
|
|
||||||
CmpItemKindInterface = { fg = p.color5 },
|
|
||||||
CmpItemKindReference = { fg = p.color5 },
|
|
||||||
CmpItemKindConstant = { fg = p.color5 },
|
|
||||||
CmpItemKindProperty = { fg = p.color5 },
|
|
||||||
CmpItemKindModule = { fg = p.color5 },
|
|
||||||
CmpItemKindClass = { fg = p.color5 },
|
|
||||||
CmpItemKindField = { fg = p.color5 },
|
|
||||||
CmpItemKindEvent = { fg = p.color5 },
|
|
||||||
CmpItemKindSnippet = { fg = p.color4 },
|
|
||||||
CmpItemKindKeyword = { fg = p.color4 },
|
|
||||||
CmpItemKindValue = { fg = p.color4 },
|
|
||||||
CmpItemKindOperator = { fg = p.color4 },
|
|
||||||
CmpItemKindTypeParameter = { fg = p.foreground },
|
|
||||||
CmpItemKindVariable = { fg = p.foreground },
|
|
||||||
CmpItemKindText = { fg = p.foreground },
|
|
||||||
CmpItemKindUnit = { fg = p.foreground },
|
|
||||||
|
|
||||||
-- Yank
|
|
||||||
YankyPut = { link = "Visual" },
|
|
||||||
YankyYanked = { link = "Visual" },
|
|
||||||
YankHighlight = { bg = p.cursorline },
|
|
||||||
|
|
||||||
-- Markdown
|
|
||||||
markdownCodeBlock = { fg = p.color7 },
|
|
||||||
markdownCodeDelimeter = { fg = p.color7 },
|
|
||||||
markdownUrl = { fg = p.color15 },
|
|
||||||
markdownLink = { fg = p.foreground, underline = true },
|
|
||||||
|
|
||||||
-- nvim-tree.lua: https://github.com/nvim-tree/nvim-tree.lua
|
|
||||||
NvimTreeEmptyFolderName = { fg = p.foreground },
|
|
||||||
NvimTreeEndOfBuffer = { fg = p.background, bg = p.background },
|
|
||||||
NvimTreeEndOfBufferNC = { fg = p.background, bg = p.background },
|
|
||||||
NvimTreeFolderIcon = { fg = p.color4, bg = p.background },
|
|
||||||
NvimTreeFolderName = { fg = p.foreground },
|
|
||||||
NvimTreeGitDeleted = { fg = p.color1 },
|
|
||||||
NvimTreeGitDirty = { fg = p.color5 },
|
|
||||||
NvimTreeGitNew = { fg = p.color4 },
|
|
||||||
NvimTreeImageFile = { fg = p.foreground },
|
|
||||||
NvimTreeIndentMarker = { fg = p.color0 },
|
|
||||||
NvimTreeNormal = { fg = p.foreground, bg = p.background },
|
|
||||||
NvimTreeNormalNC = { fg = p.foreground, bg = p.background },
|
|
||||||
NvimTreeOpenedFolderName = { fg = p.foreground },
|
|
||||||
NvimTreeRootFolder = { fg = p.color12 },
|
|
||||||
NvimTreeSpecialFile = { fg = p.color5 },
|
|
||||||
NvimTreeStatusLineNC = { bg = p.background, fg = p.color16 },
|
|
||||||
NvimTreeSymlink = { fg = p.color3 },
|
|
||||||
NvimTreeWinSeparator = { fg = p.black },
|
|
||||||
|
|
||||||
-- nvim-treesitter: https://github.com/nvim-treesitter/nvim-treesitter
|
|
||||||
["@attribute"] = { fg = p.color4 },
|
|
||||||
["@boolean"] = { fg = p.color6 },
|
|
||||||
["@character"] = { fg = p.color4 },
|
|
||||||
["@comment"] = { fg = p.comment, style = options.styles.comments },
|
|
||||||
["@conditional"] = { fg = p.color4 },
|
|
||||||
["@constant"] = { fg = p.color6 },
|
|
||||||
["@constant.builtin"] = { fg = p.color4 },
|
|
||||||
["@constant.macro"] = { fg = p.color3 },
|
|
||||||
["@constructor"] = { fg = p.color4 },
|
|
||||||
["@exception"] = { fg = p.color11 },
|
|
||||||
["@field"] = { fg = p.color7 },
|
|
||||||
["@float"] = { link = "@number" },
|
|
||||||
["@function"] = { fg = p.color4, style = options.styles.functions },
|
|
||||||
["@function.builtin"] = { fg = p.color14 },
|
|
||||||
["@function.macro"] = { fg = p.color2 },
|
|
||||||
["@include"] = { fg = p.color3 },
|
|
||||||
["@keyword"] = { fg = p.color15, style = options.styles.keywords },
|
|
||||||
["@keyword.function"] = { fg = p.color4, style = options.styles.functions },
|
|
||||||
["@keyword.operator"] = { fg = p.color12 },
|
|
||||||
["@keyword.return"] = { fg = p.color4 },
|
|
||||||
["@label"] = { fg = p.color3 },
|
|
||||||
["@method"] = { fg = p.color12 },
|
|
||||||
["@namespace"] = { fg = p.color5 },
|
|
||||||
["@number"] = { fg = p.color15 },
|
|
||||||
["@operator"] = { fg = p.color7 },
|
|
||||||
["@parameter"] = { fg = p.color15 },
|
|
||||||
["@parameter.reference"] = { fg = p.color15 },
|
|
||||||
["@property"] = { fg = p.color5 },
|
|
||||||
["@punctuation.bracket"] = { fg = p.color7 },
|
|
||||||
["@punctuation.delimiter"] = { fg = p.color7 },
|
|
||||||
["@punctuation.special"] = { fg = p.color7 },
|
|
||||||
["@repeat"] = { fg = p.color13 },
|
|
||||||
["@string"] = { fg = p.color2 },
|
|
||||||
["@string.escape"] = { fg = p.color4 },
|
|
||||||
["@string.regex"] = { fg = p.color2 },
|
|
||||||
["@string.special"] = { fg = p.color4 },
|
|
||||||
["@symbol"] = { fg = p.color3 },
|
|
||||||
["@tag"] = { fg = p.color4 },
|
|
||||||
["@tag.attribute"] = { fg = p.color3 },
|
|
||||||
["@tag.delimiter"] = { fg = p.color7 },
|
|
||||||
["@text"] = { fg = p.color7 },
|
|
||||||
["@text.danger"] = { fg = p.color9 },
|
|
||||||
["@text.emphasis"] = { fg = p.color7, italic = true },
|
|
||||||
["@text.environment.name"] = { fg = p.color3 },
|
|
||||||
["@text.environtment"] = { fg = p.color5 },
|
|
||||||
["@text.literal"] = { fg = p.color2, italic = true },
|
|
||||||
["@text.math"] = { fg = p.color6 },
|
|
||||||
["@text.note"] = { fg = p.black, bg = p.color2 },
|
|
||||||
["@text.reference"] = { fg = p.color6 },
|
|
||||||
["@text.strike"] = { fg = p.color7, strikethrough = true },
|
|
||||||
["@text.strong"] = { fg = p.color7, bold = true },
|
|
||||||
["@text.title"] = { fg = p.color3, bold = true },
|
|
||||||
["@text.underline"] = { fg = p.color15, underline = true },
|
|
||||||
["@text.uri"] = { fg = p.color3, underline = true },
|
|
||||||
["@text.warning"] = { fg = p.color0, bg = p.color1 },
|
|
||||||
["@type"] = { fg = p.color4 },
|
|
||||||
["@type.builtin"] = { fg = p.color3 },
|
|
||||||
["@variable"] = { fg = p.color7, style = options.styles.variables },
|
|
||||||
["@variable.builtin"] = { fg = p.color4 },
|
|
||||||
|
|
||||||
-- LSP semantic tokens
|
|
||||||
-- ["@lsp.type.comment"] = { link = "@comment" },
|
|
||||||
-- ["@lsp.type.enum"] = { link = "@type" },
|
|
||||||
-- ["@lsp.type.interface"] = { link = "Identifier" },
|
|
||||||
-- ["@lsp.type.keyword"] = { link = "@keyword" },
|
|
||||||
-- ["@lsp.type.namespace"] = { link = "@namespace" },
|
|
||||||
-- ["@lsp.type.parameter"] = { link = "@parameter" },
|
|
||||||
-- ["@lsp.type.property"] = { link = "@property" },
|
|
||||||
-- ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables
|
|
||||||
-- ["@lsp.typemod.method.defaultLibrary"] = { link = "@function.builtin" },
|
|
||||||
-- ["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
|
|
||||||
-- ["@lsp.typemod.operator.injected"] = { link = "@operator" },
|
|
||||||
-- ["@lsp.typemod.string.injected"] = { link = "@string" },
|
|
||||||
-- ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
|
|
||||||
-- ["@lsp.typemod.variable.injected"] = { link = "@variable" },
|
|
||||||
|
|
||||||
-- alpha.nvim: https://github.com/goolord/alpha-nvim
|
|
||||||
AlphaHeader = { fg = p.color2 },
|
|
||||||
AlphaButton = { fg = p.color4 },
|
|
||||||
AlphaFooter = { fg = p.color3 },
|
|
||||||
AlphaShortcut = { fg = p.color5 },
|
|
||||||
|
|
||||||
-- dashboard.nvim: https://github.com/nvimdev/dashboard-nvim
|
|
||||||
DashboardHeader = { fg = p.color2 },
|
|
||||||
DashboardCenter = { fg = p.color4 },
|
|
||||||
DashboardFooter = { fg = p.color3 },
|
|
||||||
DashboardShortcut = { fg = p.color5 },
|
|
||||||
|
|
||||||
-- telescope.nvim: https://github.com/nvim-telescope/telescope.nvim
|
|
||||||
TelescopeMatching = { fg = p.color2 },
|
|
||||||
TelescopeSelection = { fg = p.color2, bg = p.bg },
|
|
||||||
TelescopeMultiSelection = { bg = p.color16 },
|
|
||||||
TelescopePromptTitle = { fg = p.background, bg = p.color2 },
|
|
||||||
TelescopePreviewLine = { bg = p.background },
|
|
||||||
TelescopePromptPrefix = { fg = p.color2, bg = p.cursorline },
|
|
||||||
TelescopePromptBorder = { fg = p.cursorline, bg = p.cursorline },
|
|
||||||
TelescopePromptNormal = { fg = p.fg, bg = p.cursorline },
|
|
||||||
TelescopeResultsTitle = { fg = p.color16, bg = p.color16 },
|
|
||||||
TelescopeResultsBorder = { fg = p.color16, bg = p.color16 },
|
|
||||||
TelescopeResultsNormal = { fg = p.foreground, bg = p.color16 },
|
|
||||||
TelescopePreviewTitle = { fg = p.cursorline, bg = p.color3 },
|
|
||||||
TelescopePreviewBorder = { fg = p.cursorline, bg = p.cursorline },
|
|
||||||
TelescopePreviewNormal = { fg = p.foreground, bg = p.cursorline },
|
|
||||||
|
|
||||||
-- trouble.nvim: https://github.com/folke/trouble.nvim
|
|
||||||
LspTroubleCount = { fg = p.color6, bg = p.foreground },
|
|
||||||
LspTroubleNormal = { fg = p.foreground, bg = p.background },
|
|
||||||
LspTroubleText = { fg = p.foreground },
|
|
||||||
|
|
||||||
-- vim-gitgutter: https://github.com/airblade/vim-gitgutter
|
|
||||||
GitGutterAdd = { fg = p.color2 },
|
|
||||||
GitGutterChange = { fg = p.color3 },
|
|
||||||
GitGutterDelete = { fg = p.color1 },
|
|
||||||
}
|
|
||||||
|
|
||||||
theme.terminal_colors = {
|
|
||||||
terminal_color_0 = p.color0,
|
|
||||||
terminal_color_1 = p.color1,
|
|
||||||
terminal_color_2 = p.color2,
|
|
||||||
terminal_color_3 = p.color3,
|
|
||||||
terminal_color_4 = p.color4,
|
|
||||||
terminal_color_5 = p.color5,
|
|
||||||
terminal_color_6 = p.color6,
|
|
||||||
terminal_color_7 = p.color7,
|
|
||||||
terminal_color_8 = p.color8,
|
|
||||||
terminal_color_9 = p.color9,
|
|
||||||
terminal_color_10 = p.color10,
|
|
||||||
terminal_color_11 = p.color11,
|
|
||||||
terminal_color_12 = p.color12,
|
|
||||||
terminal_color_13 = p.color13,
|
|
||||||
terminal_color_14 = p.color14,
|
|
||||||
terminal_color_15 = p.color15,
|
|
||||||
}
|
|
||||||
|
|
||||||
for option, value in pairs(theme.terminal_colors) do
|
|
||||||
vim.g[option] = value
|
|
||||||
end
|
|
||||||
|
|
||||||
theme.highlights = vim.tbl_extend("force", {}, theme.highlights, options.highlights)
|
|
||||||
|
|
||||||
-- Hide all semantic highlights
|
|
||||||
for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
|
|
||||||
vim.api.nvim_set_hl(0, group, {})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set the highlights
|
|
||||||
for group, colors in pairs(theme.highlights) do
|
|
||||||
if colors.style then
|
|
||||||
if type(colors.style) == "table" then
|
|
||||||
colors = vim.tbl_extend("force", colors, colors.style)
|
|
||||||
end
|
|
||||||
colors.style = nil
|
|
||||||
end
|
|
||||||
vim.api.nvim_set_hl(0, group, colors)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return theme
|
|
||||||
@ -10,7 +10,7 @@ HOSTNAME=$(hostname | tr '[:lower:]' '[:upper:]')
|
|||||||
|
|
||||||
# Declare associative array for roles
|
# Declare associative array for roles
|
||||||
declare -A ROLES
|
declare -A ROLES
|
||||||
for role in LAB BT GAME VR DESKTOP_BASE DESKTOP_WORK CODE NVIDIA_GPU NVIDIA_1080_GPU TERMINAL HYPERLAND; do
|
for role in MUSIC LAB BT GAME VR DESKTOP_BASE DESKTOP_WORK CODE NVIDIA_GPU NVIDIA_1080_GPU TERMINAL HYPERLAND; do
|
||||||
ROLES["$role"]="no"
|
ROLES["$role"]="no"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -22,6 +22,7 @@ CMBOX)
|
|||||||
ROLES[CODE]="yes"
|
ROLES[CODE]="yes"
|
||||||
ROLES[TERMINAL]="yes"
|
ROLES[TERMINAL]="yes"
|
||||||
ROLES[HYPERLAND]="yes"
|
ROLES[HYPERLAND]="yes"
|
||||||
|
ROLES[MUSIC]="yes"
|
||||||
;;
|
;;
|
||||||
STEAMBOX)
|
STEAMBOX)
|
||||||
ROLES[GAME]="yes"
|
ROLES[GAME]="yes"
|
||||||
@ -76,18 +77,12 @@ sleep 1
|
|||||||
|
|
||||||
# Create backup/snapshot
|
# Create backup/snapshot
|
||||||
if pacman -Qs timeshift >/dev/null; then
|
if pacman -Qs timeshift >/dev/null; then
|
||||||
# CONFIG_FILE="/etc/timeshift/timeshift.json"
|
|
||||||
# if [ -f "$CONFIG_FILE" ]; then
|
|
||||||
# BTRFS_MODE=$(jq '.btrfs_mode' "$CONFIG_FILE")
|
|
||||||
# if [ "$BTRFS_MODE" == '"true"' ]; then
|
|
||||||
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
|
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
|
||||||
sudo timeshift --create --comments "Update script"
|
sudo timeshift --create --comments "Update script"
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable multilib (if applicable)
|
# Enable multilib (if applicable)
|
||||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
if [ "${ROLES[GAME]}" == "yes" ] || [ "${ROLES[MUSIC]}" == "yes" ]; then
|
||||||
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
||||||
printf -- '\033[33m Enabling multilib\n\033[37m'
|
printf -- '\033[33m Enabling multilib\n\033[37m'
|
||||||
sudo tee -a /etc/pacman.conf >/dev/null <<EOT
|
sudo tee -a /etc/pacman.conf >/dev/null <<EOT
|
||||||
@ -238,7 +233,8 @@ if [ "${ROLES[TERMINAL]}" == "yes" ]; then
|
|||||||
if pacman -Qs gnu-free-fonts >/dev/null; then
|
if pacman -Qs gnu-free-fonts >/dev/null; then
|
||||||
sudo pacman --noconfirm -R gnu-free-fonts
|
sudo pacman --noconfirm -R gnu-free-fonts
|
||||||
fi
|
fi
|
||||||
sudo pacman --noconfirm --needed -S dysk lazygit alacritty btop ranger tmux fd neovim ttf-nerd-fonts-symbols ttf-roboto-mono-nerd gdu ruby bottom go php luarocks composer jdk-openjdk julia nodejs npm
|
sudo pacman --noconfirm --needed -S dysk lazygit alacritty btop ranger tmux fd ttf-nerd-fonts-symbols ttf-roboto-mono-nerd gdu ruby bottom go php luarocks composer jdk-openjdk julia nodejs npm
|
||||||
|
yay --noconfirm -S --needed --aur neovim-git-bin
|
||||||
|
|
||||||
sudo npm install -g neovim
|
sudo npm install -g neovim
|
||||||
|
|
||||||
@ -332,12 +328,6 @@ EOT
|
|||||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
|
||||||
if [ "$HOSTNAME" == "CMBOX" ]; then
|
|
||||||
printf -- '\033[33m Installing CMBOX specific utilities\n\033[37m'
|
|
||||||
sudo pacman -S --noconfirm --needed onnxruntime qt6-serialport cameractrls qt6-5compat
|
|
||||||
yay --noconfirm -S --needed --aur openmpi
|
|
||||||
# yay --noconfirm -S --needed --aur opentrack-git
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${ROLES[DESKTOP_WORK]}" == "yes" ]; then
|
if [ "${ROLES[DESKTOP_WORK]}" == "yes" ]; then
|
||||||
@ -349,6 +339,38 @@ if [ "${ROLES[DESKTOP_WORK]}" == "yes" ]; then
|
|||||||
flatpak install -y flathub org.gimp.GIMP
|
flatpak install -y flathub org.gimp.GIMP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install music production utility
|
||||||
|
if [ "${ROLES[MUSIC]}" == "yes" ]; then
|
||||||
|
sudo pacman -U --noconfirm https://archive.archlinux.org/packages/w/wine-staging/wine-staging-9.21-1-x86_64.pkg.tar.zst
|
||||||
|
PKG="wine-staging"
|
||||||
|
# Check if package is already in IgnorePkg
|
||||||
|
if ! grep -q "^IgnorePkg.*\b$PKG\b" /etc/pacman.conf; then
|
||||||
|
sudo sed -i "/^#IgnorePkg/ s/^#//" /etc/pacman.conf # uncomment if commented
|
||||||
|
sudo sed -i "/^IgnorePkg/ s/$/ $PKG/" /etc/pacman.conf # append package name
|
||||||
|
echo "Added $PKG to IgnorePkg in /etc/pacman.conf"
|
||||||
|
else
|
||||||
|
echo "$PKG is already in IgnorePkg."
|
||||||
|
fi
|
||||||
|
yay -Rdd pulseaudio pulseaudio-alsa pulseaudio-jack jack2
|
||||||
|
sudo pacman -S --noconfirm --needed pipewire pipewire-jack pipewire-alsa pipewire-pulse gamemode
|
||||||
|
sudo pacman -S --noconfirm --needed pipewire-tools qpwgraph realtime-privileges yabridge yabridgectl
|
||||||
|
yay --noconfirm -S --needed --aur bitwig-studio
|
||||||
|
|
||||||
|
sudo usermod -a -G realtime,audio,gamemode $USER
|
||||||
|
|
||||||
|
sudo tee /etc/security/limits.d/99-pipewire.conf <<'EOF'
|
||||||
|
@audio soft rtprio 95
|
||||||
|
@audio soft memlock unlimited
|
||||||
|
@audio hard rtprio 95
|
||||||
|
@audio hard memlock unlimited
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl --user --now disable pulseaudio.{socket,service}
|
||||||
|
systemctl --user mask pulseaudio
|
||||||
|
systemctl --user --now enable pipewire{,-pulse}.{socket,service} filter-chain.service
|
||||||
|
pw-metadata -n settings 0 clock.min-quantum 128
|
||||||
|
fi
|
||||||
|
|
||||||
# Install game utility
|
# Install game utility
|
||||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
if [ "${ROLES[GAME]}" == "yes" ]; then
|
||||||
printf -- '\033[33m Installing game utilities\n\033[37m'
|
printf -- '\033[33m Installing game utilities\n\033[37m'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user