Compare commits

..

9 Commits

Author SHA1 Message Date
andrzej 609f11ab7d angular cli 2024-11-07 13:35:03 +01:00
andrzej 994f2906bf shorter cwd for statusline 2024-11-07 13:34:57 +01:00
andrzej 275a9e9d94 use wordcounter in prose mode 2024-11-07 13:34:40 +01:00
andrzej 8b461f9078 custom v text 2024-11-07 13:34:26 +01:00
andrzej 091d0ab6bb add themes 2024-11-07 13:34:12 +01:00
andrzej cc0fd3c31a wordcount 2024-11-07 13:34:08 +01:00
andrzej 4fa602f75f strip down lualine 2024-11-07 13:33:50 +01:00
andrzej b55ed53572 add formatting for angular 2024-11-07 13:33:40 +01:00
andrzej bbc8bdbea2 btop theme 2024-11-07 13:33:29 +01:00
9 changed files with 187 additions and 3 deletions

View File

@ -0,0 +1,119 @@
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]=""
# Base
# Main text color
theme[main_fg]="#e0def4"
# Text
# Title color for boxes
theme[title]="#908caa"
# Subtle
# Highlight color for keyboard shortcuts
theme[hi_fg]="#e0def4"
# Text
# Background color of selected item in processes box
theme[selected_bg]="#524f67"
# HL High
# Foreground color of selected item in processes box
theme[selected_fg]="#f6c177"
# Gold
# Color of inactive/disabled text
theme[inactive_fg]="#403d52"
# HL Med
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#9ccfd8"
# Foam
# Background color of the percentage meters
theme[meter_bg]="#9ccfd8"
# Foam
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#c4a7e7"
# Iris
# Cpu box outline color
theme[cpu_box]="#ebbcba"
# Rose
# Memory/disks box outline color
theme[mem_box]="#31748f"
# Pine
# Net up/down box outline color
theme[net_box]="#c4a7e7"
# Iris
# Processes box outline color
theme[proc_box]="#eb6f92"
# Love
# Box divider line and small boxes line color
theme[div_line]="#6e6a86"
# Muted
# Temperature graph colors
theme[temp_start]="#ebbcba"
# Rose
theme[temp_mid]="#f6c177"
# Gold
theme[temp_end]="#eb6f92"
# Love
# CPU graph colors
theme[cpu_start]="#f6c177"
# Gold
theme[cpu_mid]="#ebbcba"
# Rose
theme[cpu_end]="#eb6f92"
# Love
# Mem/Disk free meter
# all love
theme[free_start]="#eb6f92"
theme[free_mid]="#eb6f92"
theme[free_end]="#eb6f92"
# Mem/Disk cached meter
# all iris
theme[cached_start]="#c4a7e7"
theme[cached_mid]="#c4a7e7"
theme[cached_end]="#c4a7e7"
# Mem/Disk available meter
# all pine
theme[available_start]="#31748f"
theme[available_mid]="#31748f"
theme[available_end]="#31748f"
# Mem/Disk used meter
# all rose
theme[used_start]="#ebbcba"
theme[used_mid]="#ebbcba"
theme[used_end]="#ebbcba"
# Download graph colors
# Pine for start, foam for the rest
theme[download_start]="#31748f"
theme[download_mid]="#9ccfd8"
theme[download_end]="#9ccfd8"
# Upload graph colors
theme[upload_start]="#ebbcba"
# Rose for start
theme[upload_mid]="#eb6f92"
# Love for mid and end
theme[upload_end]="#eb6f92"
# Process box color gradient for threads, mem and cpu usage
theme[process_start]="#31748f"
# Pine
theme[process_mid]="#9ccfd8"
# Foam for mid and end
theme[process_end]="#9ccfd8"

View File

@ -40,7 +40,14 @@ vim.api.nvim_create_autocmd({ "DirChanged", "VimEnter" }, {
callback = function() callback = function()
local cwdString = vim.fn.getcwd() local cwdString = vim.fn.getcwd()
local length = cwdString:len() local length = cwdString:len()
local desiredLength = 32 local _, j = string.find(cwdString, "/home/andrzej/")
if j ~= nil then
cwdString = "~" .. string.sub(cwdString, j, length)
length = cwdString:len()
end
length = cwdString:len()
local desiredLength = 40
if desiredLength < length then if desiredLength < length then
vim.g.cwdShortened = "..." .. cwdString:sub(length - 16, length) vim.g.cwdShortened = "..." .. cwdString:sub(length - 16, length)
else else

View File

@ -21,6 +21,7 @@ return { -- Autoformat
-- is found. -- is found.
javascript = { { "prettierd", "prettier" } }, javascript = { { "prettierd", "prettier" } },
bash = { "shellcheck" }, bash = { "shellcheck" },
htmlangular = { "prettierd", "prettier", "ts_ls" },
}, },
}, },
} }

View File

@ -26,8 +26,8 @@ return {
lualine_a = { "mode", "vim.g.cmptoggle and 'cmp'", "branch" }, lualine_a = { "mode", "vim.g.cmptoggle and 'cmp'", "branch" },
lualine_b = { "vim.g.cwdShortened", "diff", "diagnostics" }, lualine_b = { "vim.g.cwdShortened", "diff", "diagnostics" },
lualine_c = { "filename" }, lualine_c = { "filename" },
lualine_x = { "buffers" }, lualine_x = {},
lualine_y = { "encoding", "filetype", "progress" }, lualine_y = { "filetype" },
lualine_z = { lualine_z = {
--"vim.g.cwdShortened" --"vim.g.cwdShortened"
-- "datetime", -- "datetime",

View File

@ -0,0 +1,10 @@
return {
"dimfeld/section-wordcount.nvim",
config = function()
require("section-wordcount").setup({
-- These are the default values and can be omitted
highlight = "String",
virt_text_pos = "eol",
})
end,
}

View File

@ -83,4 +83,6 @@ return {
{ "EdenEast/nightfox.nvim", priority = 1000 }, { "EdenEast/nightfox.nvim", priority = 1000 },
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 }, { "catppuccin/nvim", name = "catppuccin", priority = 1000 },
{ "folke/tokyonight.nvim", priority = 1000 }, { "folke/tokyonight.nvim", priority = 1000 },
{ "mellow-theme/mellow.nvim" },
{ "bettervim/yugen.nvim" },
} }

View File

@ -8,7 +8,47 @@ return {
vim.o.foldenable = true vim.o.foldenable = true
vim.keymap.set("n", "zR", require("ufo").openAllFolds) vim.keymap.set("n", "zR", require("ufo").openAllFolds)
vim.keymap.set("n", "zM", require("ufo").closeAllFolds) vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
local handler = function(virtText, lnum, endLnum, width, truncate, x)
-- local newVirtText = {}
-- local suffix = (" 󰁂 %d "):format(endLnum - lnum)
-- local sufWidth = vim.fn.strdisplaywidth(suffix)
-- local targetWidth = width - sufWidth
-- local curWidth = 0
-- for _, chunk in ipairs(virtText) do
-- local chunkText = chunk[1]
-- local chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- if targetWidth > curWidth + chunkWidth then
-- table.insert(newVirtText, chunk)
-- else
-- chunkText = truncate(chunkText, targetWidth - curWidth)
-- local hlGroup = chunk[2]
-- table.insert(newVirtText, { chunkText, hlGroup })
-- chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- -- str width returned from truncate() may less than 2nd argument, need padding
-- if curWidth + chunkWidth < targetWidth then
-- suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
-- end
-- break
-- end
-- curWidth = curWidth + chunkWidth
-- end
-- table.insert(newVirtText, { suffix, "MoreMsg" })
return virtText
end
require("ufo").setup({ require("ufo").setup({
fold_virt_text_handler = handler,
open_fold_hl_timeout = 0,
close_fold_kinds_for_ft = {},
enable_get_fold_virt_text = true,
preview = {
win_config = {
border = { "", "", "", "", "", "", "", "" },
winhighlight = "Normal:Folded",
winblend = 0,
},
},
provider_selector = function(bufnr, filetype, buftype) provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" } return { "treesitter", "indent" }
end, end,

View File

@ -6,6 +6,7 @@ vim.api.nvim_create_autocmd({ "Bufenter" }, {
callback = function() callback = function()
if vim.bo.buftype ~= "nofile" and vim.bo.filetype == "markdown" then if vim.bo.buftype ~= "nofile" and vim.bo.filetype == "markdown" then
vim.cmd("PencilSoft") vim.cmd("PencilSoft")
require("section-wordcount").wordcounter({})
setProseModeVars(true) setProseModeVars(true)
else else
vim.cmd("PencilOff") vim.cmd("PencilOff")

View File

@ -45,3 +45,7 @@ SAVEHIST=10000
setopt SHARE_HISTORY setopt SHARE_HISTORY
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Load Angular CLI autocompletion.
source <(ng completion script)