Compare commits

..
12 Commits
23 changed files with 405 additions and 210 deletions

No files matched your search

+11 -5
View File
@@ -14,19 +14,20 @@ vim.cmd("set textwidth=0")
vim.cmd("set wrapmargin=0")
vim.cmd("set linebreak")
-- vim.cmd("set colorcolumn=85")
vim.cmd("set conceallevel=0") -- DONT hide characters in MD
vim.cmd("set conceallevel=0") -- 0 to NOT hide characters in MD
vim.cmd("set tabstop=4")
vim.cmd("set shiftwidth=4")
vim.cmd("set noexpandtab") -- expandtab to use spaces instead of tabs
vim.cmd("set wrap")
-- vim.cmd("set cmdheight=0") -- HACK: hide command line while is not being used, no idea why this works without logic
vim.lsp.inlay_hint.enable(false)
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
-- ╭─────────────╮
-- │ Colorscheme │
-- ╰─────────────╯
vim.cmd("colorscheme komau") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau
vim.o.background = "dark" -- "dark" or "light"
vim.cmd("colorscheme gruvbox") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau
vim.o.background = "light" -- "dark" or "light"
-- ╭───────────────────╮
-- │ Default clipboard │
@@ -37,8 +38,13 @@ vim.cmd("set clipboard=unnamedplus")
-- │ Chars │
-- ╰───────╯
vim.opt.fillchars = {
-- horiz = "-",
-- vert = "▏", -- │ ▎▍▌▋▊▉█
horiz = "―", -- ⎯, ⎯
horizup = " ", -- ○
horizdown = " ",
vert = "▏", -- ▏│ ▎▍▌▋▊▉█
vertleft = "◗", -- ⏴
vertright = "◗", -- ⏵
verthoriz = "◗",
stl = " ",
eob = " ",
}
+27 -27
View File
@@ -1,44 +1,44 @@
{
"aerial.nvim": { "branch": "master", "commit": "28fe6e822ae344544c379d60fcb13c9519a1f08a" },
"auto-session": { "branch": "main", "commit": "6cde3874a9283c2db55627acca5f28e4fa402320" },
"autoclose.nvim": { "branch": "main", "commit": "bafd0368716216fa6a7bb2a43ecd889b44efdb46" },
"auto-session": { "branch": "main", "commit": "02a5588f677970a9bc784115c62bef9e5855499b" },
"autoclose.nvim": { "branch": "main", "commit": "bcad8e84d9cd78ba73433cb396b68e489af11e31" },
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"flash.nvim": { "branch": "main", "commit": "b6346946d10d07998efee029fb0f7a593806d0cd" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "eb60cc7b94c46005237fd34170d76f3a089a90aa" },
"grug-far.nvim": { "branch": "main", "commit": "beb2ce490b72048c587e8a3d919cba1b4608bb04" },
"gruvbox.nvim": { "branch": "main", "commit": "154eb5ff5b96d0641307113fa385eaf0d36d9796" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
"flash.nvim": { "branch": "main", "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a" },
"friendly-snippets": { "branch": "main", "commit": "b4d01b0fdf3c9a549961c2f9ffe8dc09be166219" },
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
"gitsigns.nvim": { "branch": "main", "commit": "fd780920613e541cbdfac41bf711583ed49f9249" },
"grug-far.nvim": { "branch": "main", "commit": "11595bf747edc270bce2069d1020502ad4ae56cf" },
"gruvbox.nvim": { "branch": "main", "commit": "5f14f3426f34914b96d3595fa70a70b70329759a" },
"indent-blankline.nvim": { "branch": "master", "commit": "f1e186e44d3b7f9ae918008e2c28ce37c6023d2d" },
"komau.vim": { "branch": "master", "commit": "f7c7a00c0cbb67ed269b565a4ada47d96dce14f3" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"mini.clue": { "branch": "main", "commit": "4d506660e7030a15748ab073bebfe3ed03884000" },
"mini.icons": { "branch": "main", "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0" },
"multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" },
"neo-tree.nvim": { "branch": "main", "commit": "b01ee1769144c4491ea44bc329cb84040e9793be" },
"no-neck-pain.nvim": { "branch": "main", "commit": "434fed70b1ee553f8f27e6da7b3899f71b3c6f99" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-colorizer.lua": { "branch": "master", "commit": "149fbd9f5e25511b0a8bad3ccecd43d1bc584f86" },
"nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" },
"mini.clue": { "branch": "main", "commit": "149236aed07cf15266dbaf2736452ad6b0dced47" },
"mini.icons": { "branch": "main", "commit": "f916635dc5ae2f479fbb9ab8184bb9444b62e86c" },
"neo-tree.nvim": { "branch": "main", "commit": "d5b8a12b74683ddaefa519ce66a097610672859f" },
"no-neck-pain.nvim": { "branch": "main", "commit": "55f69b7ff536303dcd37460d7cbced9691b3f0a2" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" },
"nvim-colorizer.lua": { "branch": "master", "commit": "72a05f62c52241bc7441c820eb53946f92b2e6a4" },
"nvim-lint": { "branch": "master", "commit": "f6230a5c06ba59e6059c14637f1dbe29a7978b9b" },
"nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" },
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
"nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
"nvim-web-devicons": { "branch": "master", "commit": "dad71387de386a946b123079d0e53f23028f3abd" },
"nvim-treesitter": { "branch": "main", "commit": "ca581c3436fc2b236847f5b739ebc263739e5ca6" },
"nvim-treesitter-context": { "branch": "master", "commit": "8decd73460d26ef0a0befb745d022dd1fc2c38b8" },
"nvim-ts-autotag": { "branch": "main", "commit": "d7220b55e16ed3c04e88086256def5d282429493" },
"nvim-web-devicons": { "branch": "master", "commit": "ec309a0eaff6ea967e58c275996155ab5c16938d" },
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
"overseer.nvim": { "branch": "master", "commit": "a93d9f6d6defdac4bcd6d2c8ba988650e42e0a0e" },
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" },
"smear-cursor.nvim": { "branch": "main", "commit": "9e9378d6ee34bb3782e0e8c63d9ec8ca618b479b" },
"scope.nvim": { "branch": "main", "commit": "01cc3d5bb794e6d7afbb1b02a7e941ddf736d9ea" },
"smear-cursor.nvim": { "branch": "main", "commit": "f6cb57c342268177f719acc3968b9d8de3ecc969" },
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
"telescope-git-file-history.nvim": { "branch": "master", "commit": "4442114f9257e682e60a8cb6de14cf988e26055c" },
"telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" },
"telescope.nvim": { "branch": "master", "commit": "40aedd8a68c78a656a10a8d62d80c54af59420fb" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
+3 -3
View File
@@ -1,5 +1,5 @@
return {
cmd = { 'pylsp' },
filetypes = { 'python' },
root_markers = { 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', '.git' },
cmd = { "pyright-langserver", "--stdio" },
filetypes = { "python", "py" },
root_markers = { "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", ".git" },
}
+10
View File
@@ -0,0 +1,10 @@
return {
cmd = { "ruff", "server" },
filetypes = { "python" },
root_markers = { "pyproject.toml", "ruff.toml", ".ruff.toml", ".git" },
init_options = {
settings = {
-- Ruff language server settings go here
},
},
}
+5
View File
@@ -11,3 +11,8 @@ local autocmd = vim.api.nvim_create_autocmd
-- require("lualine").refresh()
-- end,
-- })
-- vim.api.nvim_create_autocmd("BufWritePost", {
-- callback = function(event)
-- vim.notify(("Saved: %s"):format(vim.fn.fnamemodify(event.file, ":t")), vim.log.levels.INFO)
-- end,
-- })
+1
View File
@@ -12,6 +12,7 @@ vim.lsp.enable("jdtls")
vim.lsp.enable("denols")
vim.lsp.enable("luals")
vim.lsp.enable("pyright")
-- vim.lsp.enable("ruff")
vim.lsp.enable("rust_analyzer")
vim.lsp.enable("solargraph")
vim.lsp.enable("ts_ls")
+70 -11
View File
@@ -13,17 +13,17 @@ local map = vim.keymap.set
---- Bufferline ----
-- Not used but maybe in the future
-- map("n", "bg", "<CMD>BufferLinePick<CR>")
-- TODO: implement close others
-- map("n", "<leader>bpx", "<CMD>BufferLinePickClose<CR>")
map("n", "<leader>box", "<CMD>BufferLineCloseOthers<CR>")
map("n", "<Tab>", "<CMD>BufferLineCycleNext<CR>")
map("n", "<S-Tab>", "<CMD>BufferLineCyclePrev<CR>")
map("n", "<leader>bsd", "<CMD>BufferLineSortByDirectory<CR>")
map("n", "<leader>bse", "<CMD>BufferLineSortByExtension<CR>")
map("n", "<leader>bsr", "<CMD>BufferLineSortByRelativeDirectory<CR>")
map("n", "<leader>bst", "<CMD>BufferLineSortByTabs<CR>")
-- map("n", "<leader>box", "<CMD>BufferLineCloseOthers<CR>")
map("n", "<Tab>", "<CMD>BufferNext<CR>")
map("n", "<S-Tab>", "<CMD>BufferPrevious<CR>")
map("n", "<leader>bsd", "<CMD>BufferOrderByDirectory<CR>")
map("n", "<leader>bse", "<CMD>BufferOrderByLanguage<CR>")
map("n", "<leader>bsb", "<CMD>BufferOrderByBufferNumber<CR>")
-- buffers
map("n", "<S-h>", "<cmd>BufferLineMovePrev<cr>", { desc = "Move buffer to left" })
map("n", "<S-l>", "<cmd>BufferLineMoveNext<cr>", { desc = "Move buffer to right" })
map("n", "<S-h>", "<cmd>BufferMovePrevious<cr>", { desc = "Move buffer to left" })
map("n", "<S-l>", "<cmd>BufferMoveNext<cr>", { desc = "Move buffer to right" })
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next Buffer" })
map("n", "<leader>bd", function()
@@ -48,8 +48,8 @@ map("n", "<leader>ct", "<cmd>lua require('blueprints').createFromTemplateTelesco
---- Git ----
map("n", "<leader>gb", "<CMD>Gitsigns blame<CR>", { desc = "Git blame" })
map("n", "<leader>ghr", "<CMD>Gitsigns reset_hunk<CR>", { desc = "Git next change" })
map("n", "<leader>gha", "<CMD>Gitsigns stage_hunk<CR>", { desc = "Git next change" })
map("n", "<leader>gr", "<CMD>Gitsigns reset_hunk<CR>", { desc = "Git next change" })
map("n", "<leader>ga", "<CMD>Gitsigns stage_hunk<CR>", { desc = "Git next change" })
map("n", "]g", "<CMD>Gitsigns next_hunk<CR>", { desc = "Git next change" })
map("n", "[g", "<CMD>Gitsigns prev_hunk<CR>", { desc = "Git prev change" })
map("n", "<leader>gdo", "<CMD>DiffviewOpen<CR>", { desc = "Git diff view open" })
@@ -57,6 +57,13 @@ map("n", "<leader>gdx", "<CMD>DiffviewClose<CR>", { desc = "Git diff view close"
map("n", "<leader>gh", "<CMD>Gitsigns preview_hunk_inline<CR>", { desc = "Git preview hunk inline" })
map("n", "<leader>gtb", "<CMD>Gitsigns toggle_current_line_blame<CR>", { desc = "Git toggle line blame" })
map("n", "<leader>gtd", "<CMD>Gitsigns toggle_deleted<CR>", { desc = "Git toggle deleted" })
map("n", "<leader>gco", "<CMD>GitConflictChooseOurs<CR>", { desc = "Git conflict resolve ours" })
map("n", "<leader>gct", "<CMD>GitConflictChooseTheirs<CR>", { desc = "Git conflict resolve theirs" })
map("n", "<leader>gcb", "<CMD>GitConflictChooseBoth<CR>", { desc = "Git conflict resolve both" })
map("n", "<leader>gcn", "<CMD>GitConflictChooseNone<CR>", { desc = "Git conflict resolve none" })
map("n", "<leader>gcq", "<CMD>GitConflictListQf<CR>", { desc = "Git conflicts to quickfix" })
map("n", "]c", "<CMD>GitConflictNextConflict<CR>", { desc = "Git conflicts find next" })
map("n", "[c", "<CMD>GitConflictPrevConflict<CR>", { desc = "Git conflicts find prev" })
-- lazygit
map("n", "<leader>gg", function()
@@ -73,6 +80,55 @@ map("n", "<leader>gs", function()
Snacks.lazygit({ args = { "status" } })
end, { desc = "Lazygit Log (cwd)" })
-- developer custom utils
map("n", "<leader>cu", function()
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local opts = {
layout_config = {
width = 0.3,
height = 0.3,
}
}
local utils = { "Conventional commit", "Colorizer", "Code templates" }
local commands = { "bash ~/.config/nvim/tasks/commit-builder.sh", "~/.config/utils/colorizer",
"~/.config/utils/code_templates" }
pickers
.new(opts, {
prompt_title = "External Utils",
finder = finders.new_table({
results = utils,
}),
sorter = conf.generic_sorter(opts),
attach_mappings = function(prompt_bufnr)
actions.select_default:replace(function()
actions.close(prompt_bufnr)
local selection = action_state.get_selected_entry()
local index = {}
for k, v in pairs(utils) do
index[v] = k
end
local pos = index[selection[1]]
Snacks.terminal.toggle(
string.format("clear && %s && echo 'Finished | Enter to exit' && read", commands[pos]),
{ interactive = true, win = { height = 0.4, width = 0.4, position = "bottom" } })
end)
return true
end,
})
:find()
end, { desc = "Deploy developer tools selector" })
---------------------------------------------------------------------------
-- Neotree
@@ -151,6 +207,9 @@ map("n", "<leader>fh", "<cmd> Telescope help_tags <CR>", { desc = "Help page" })
map("n", "<leader>fo", "<cmd> Telescope oldfiles <CR>", { desc = "Fild old files" })
map("n", "<leader>fz", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
map("n", "<C-/>", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
map("n", "<leader>ft", function()
Snacks.picker("todo_comments")
end, { desc = "Help page" })
-- Flash search (better "f")
map({ "n", "x", "o" }, "s", function()
+3 -1
View File
@@ -5,11 +5,13 @@ return {
-- │ Code parse │
{
"nvim-treesitter/nvim-treesitter",
branch = "main",
build = ":TSUpdate",
opts = function()
return require("plugins.opts.treesitter")
end,
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
require("nvim-treesitter.config").setup(opts)
end,
},
+14 -5
View File
@@ -3,12 +3,21 @@
-- ╰─────────╯
return {
{
"akinsho/bufferline.nvim",
version = "*",
dependencies = "nvim-tree/nvim-web-devicons",
opts = function()
return require("plugins.opts.bufferline")
"romgrk/barbar.nvim",
dependencies = {
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
},
init = function()
vim.g.barbar_auto_setup = false
end,
config = function(_, opts)
require("barbar").setup(opts)
end,
opts = {
animation = false,
},
version = "^1.0.0", -- optional: only update when a new 1.x version is released
},
-- Have buffers by tab
+16
View File
@@ -11,6 +11,22 @@ return {
{ "tpope/vim-fugitive" },
{
'akinsho/git-conflict.nvim',
version = "*",
opts = {
default_mappings = true, -- disable buffer local mapping created by this plugin
default_commands = true, -- disable commands created by this plugin
disable_diagnostics = false, -- This will disable the diagnostics in a buffer whilst it is conflicted
list_opener = 'copen',
highlights = {
incoming = 'DiffAdd',
current = 'DiffText',
}
},
config = true
}
-- {
-- -- dir = "~/Documents/Code/monkey-alert.nvim",
-- "dqnid/monkey-alert.nvim",
-17
View File
@@ -2,23 +2,6 @@ return {
{
"mfussenegger/nvim-lint",
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
opts = {
linters_by_ft = {
fish = { "fish" },
css = { "stylelint" },
scss = { "stylelint" },
ts = { "eslint_d" },
js = { "eslint_d" },
jsx = { "eslint_d" },
tsx = { "eslint_d" },
-- Use the "*" filetype to run linters on all filetypes.
-- ['*'] = { 'global linter' },
-- Use the "_" filetype to run linters on filetypes that don't have other linters configured.
-- ['_'] = { 'fallback linter' },
-- ["*"] = { "typos" },
},
},
config = function()
local lint = require("lint")
-118
View File
@@ -1,118 +0,0 @@
local config = {
highlights = {
buffer_selected = { bold = true },
diagnostic_selected = { bold = true },
info_selected = { bold = true },
info_diagnostic_selected = { bold = true },
warning_selected = { bold = true },
warning_diagnostic_selected = { bold = true },
error_selected = { bold = true },
error_diagnostic_selected = { bold = true },
},
options = {
themeable = true,
numbers = "none",
diagnostics = false, -- or "nvim_lsp", "coc"
max_prefix_length = 8,
close_command = "b# | bd#",
right_mouse_command = "b# | bd#",
left_mouse_command = "buffer %d",
buffer_close_icon = "󰅖",
modified_icon = "●",
close_icon = "",
left_trunc_marker = "",
right_trunc_marker = "",
max_name_length = 18,
truncate_names = true,
tab_size = 18,
color_icons = true,
show_buffer_icons = true,
show_buffer_close_icons = true,
show_tab_indicators = true,
duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
separator_style = { "▍", "" }, -- { "▏", "" } | "slant" | "slope" | "thick" | "thin" | { 'any', 'any' },
-- always_show_bufferline = false,
auto_toggle_bufferline = true,
show_close_icon = true,
hover = {
enabled = true,
delay = 200,
reveal = { "close" },
},
offsets = {
{
filetype = "neo-tree",
text = "", --  , , 
highlight = "Filler",
-- text = function()
-- return vim.fn.getcwd()
-- end,
-- highlight = "Directory",
-- text_align = "left",
separator = "", -- use a "true" to enable the default, or set your own character
},
},
groups = {
options = {
toggle_hidden_on_enter = true, -- when you re-enter a hidden group this options re-opens that group so the buffer is visible
},
items = {
-- {
-- name = "Tests",
-- -- icon = "󰙨 ",
-- highlight = { underline = false },
-- priority = 2,
-- matcher = function(buf)
-- return buf.path:match("%.test") or buf.path:match("%_test") or buf.path:match("%_spec")
-- end,
-- },
-- {
-- name = "Docs",
-- -- icon = "󰈙 ",
-- priority = 3,
-- -- highlight = { undercurl = false, sp = "grey" },
-- highlight = { undercurl = false },
-- auto_close = false,
-- matcher = function(buf)
-- return buf.path:match("%.md") or buf.path:match("%.txt")
-- end,
-- separator = {
-- style = require("bufferline.groups").separator.tab,
-- },
-- },
{
name = "Sh",
-- icon = " ",
highlight = { undercurl = false },
auto_close = false,
priority = 4,
matcher = function(buf)
return buf.path:match("zsh")
end,
separator = {
style = require("bufferline.groups").separator.tab,
},
},
{
name = "Container",
highlight = { undercurl = false },
auto_close = false,
-- icon = " ",
matcher = function(buf)
return buf.path:match("dockerfile")
or buf.path:match("DOCKERFILE")
or buf.path:match("Dockerfile")
or buf.path:match("docker%-compose%.yml")
end,
separator = {
style = require("bufferline.groups").separator.tab,
},
},
},
},
},
}
return config
+17 -13
View File
@@ -4,19 +4,20 @@ local config = {
rust = { "rustfmt" },
lua = { "stylua" },
go = { "goimports", "gofmt" },
javascript = { "prettierd", "prettier", "biome", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", "biome", stop_after_first = true },
typescript = { "prettierd", "prettier", "biome", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", "biome", stop_after_first = true },
css = { "prettierd", "prettier", "biome", stop_after_first = true },
scss = { "prettierd", "prettier", "biome", stop_after_first = true },
-- python = function(bufnr)
-- if require("conform").get_formatter_info("ruff_format", bufnr).available then
-- return { "ruff_format" }
-- else
-- return { "isort", "black" }
-- end
-- end,
javascript = { "biome", "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "biome", "prettierd", "prettier", stop_after_first = true },
typescript = { "biome", "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "biome", "prettierd", "prettier", stop_after_first = true },
css = { "biome", "prettierd", "prettier", stop_after_first = true },
scss = { "biome", "prettierd", "prettier", stop_after_first = true },
python = {
-- To fix auto-fixable lint errors.
"ruff_fix",
-- To run the Ruff formatter.
"ruff_format",
-- To organize the imports.
"ruff_organize_imports",
},
["_"] = { "trim_whitespace" }, -- run only on filetypes without formater
-- ["*"] = { "trim_whitespace" }, -- run in all filetypes
},
@@ -26,6 +27,9 @@ local config = {
},
-- Customize formatters
formatters = {
ruff = {
prepend_args = { "format" },
},
shfmt = {
prepend_args = { "-i", "2" },
},
+1 -1
View File
@@ -35,7 +35,7 @@ local options = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff" },
lualine_c = { "filename", "diagnostics" },
lualine_x = { "searchcount", "filetype", "encoding", "fileformat" },
lualine_x = { "lsp_status", "searchcount", "filetype", "encoding" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
+84
View File
@@ -0,0 +1,84 @@
local config = {
views = {
cmdline_popup = {
position = {
row = 3,
col = "50%",
},
size = {
width = 60,
height = "auto",
},
},
cmdline_popupmenu = {
position = {
row = 6,
col = "50%",
},
size = {
width = 60,
height = "auto",
},
},
},
cmdline = {
enabled = true,
view = "cmdline", -- cmdline, cmdline_popup
opts = {},
---@type table<string, CmdlineFormat>
format = {
cmdline = { pattern = "^:", icon = "λ", lang = "vim", title = "" },
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
lua = {
pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" },
icon = "",
lang = "lua",
},
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
input = {}, -- Used by input()
-- lua = false, -- to disable a format, set to `false`
},
},
notify = {
enabled = false,
view = "notify",
},
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
},
-- Bottom right notifications with the lsp executions
progress = {
enabled = false,
--- @type NoiceFormat|string
format = "lsp_progress",
--- @type NoiceFormat|string
format_done = "lsp_progress_done",
throttle = 1000 / 30, -- frequency to update lsp progress message
view = "mini",
},
},
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
routes = {
{ view = "cmdline", filter = { event = "msg_showmode" } },
{
filter = {
event = "msg_show",
kind = "",
find = "written",
},
opts = { skip = true },
},
},
}
return config
+22
View File
@@ -31,4 +31,26 @@ return {
})
end,
},
{
"toppair/peek.nvim",
event = { "VeryLazy" },
build = "deno task --quiet build:fast",
opts = {
auto_load = true, -- whether to automatically load preview when
close_on_bdelete = true,
syntax = true,
theme = "light", -- 'dark' or 'light'
update_on_change = true,
-- app = "webview", -- 'webview', 'browser', string or a table of strings
app = { "surf" },
filetype = { "markdown" }, -- list of filetypes to recognize as markdown
throttle_at = 200000, -- start throttling when file exceeds this
throttle_time = "auto", -- minimum amount of time in milliseconds
},
config = function(_, opts)
require("peek").setup(opts)
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
end,
},
}
+13 -7
View File
@@ -1,4 +1,14 @@
local config = {
{
"folke/noice.nvim",
event = "VeryLazy",
opts = function()
return require("plugins.opts.noice")
end,
dependencies = {
"MunifTanjim/nui.nvim",
},
},
{
"mason-org/mason.nvim",
opts = {
@@ -35,20 +45,16 @@ local config = {
indent = { enabled = false },
input = { enabled = false },
picker = { enabled = true },
notifier = { enabled = false },
notifier = { enabled = true },
notify = { enabled = true },
quickfile = { enabled = false },
scope = { enabled = true },
terminal = { enabled = true },
scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
},
},
-- Task runner
-- TODO: think if really necessary
{
"stevearc/overseer.nvim",
opts = {},
},
{
"rmagatti/auto-session",
lazy = false,
+1
View File
@@ -27,6 +27,7 @@ return {
for _, ext in ipairs(opts.extensions_list) do
telescope.load_extension(ext)
end
require("plugins.utils.telescope").setup()
end,
},
{ "mbbill/undotree" },
+3 -2
View File
@@ -36,7 +36,8 @@ return {
},
},
{
"ellisonleao/gruvbox.nvim",
"dqnid/gruvbox.nvim",
-- dir = "~/Documents/Code/gruvbox.nvim",
priority = 1000,
config = true,
opts = {
@@ -57,7 +58,7 @@ return {
invert_signs = false,
invert_tabline = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
contrast = "soft", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
+55
View File
@@ -0,0 +1,55 @@
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local make_entry = require("telescope.make_entry")
local conf = require("telescope.config").values
local M = {}
local live_multigrep = function(opts)
opts = opts or {}
opts.cwd = opts.cwd or vim.uv.cwd()
local finder = finders.new_async_job({
command_generator = function(prompt)
if not prompt or prompt == "" then
return nil
end
local pieces = vim.split(prompt, " ")
local args = { "rg" }
if pieces[1] then
table.insert(args, "-e")
table.insert(args, pieces[1])
end
if pieces[2] then
table.insert(args, "-g")
table.insert(args, pieces[2])
end
---@diagnostic disable-next-line: deprecated
return vim.tbl_flatten({
args,
{ "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" },
})
end,
entry_maker = make_entry.gen_from_vimgrep(opts),
cwd = opts.cwd,
})
pickers
.new(opts, {
debounce = 100,
prompt_title = "Multi Grep",
finder = finder,
previewer = conf.grep_previewer(opts),
sorter = require("telescope.sorters").empty(),
})
:find()
end
M.setup = function()
vim.keymap.set("n", "<leader>fW", live_multigrep)
end
return M
@@ -0,0 +1,10 @@
feat | New feature
fix | A bug fix
chore | Unavoidable task not related
build | Changes to the build system or external dependencies
ci | Changes to our CI configuration
docs | Documentation only changes
style | Changes to white-space, formatting, missing semi-colons, etc.
refactor | A code change that neither fixes a bug nor adds a feature
perf | A code change that improves performance
test | Adding or correcting tests
+27
View File
@@ -0,0 +1,27 @@
:broom: │ 🧹 │ clean, cleanup, remove
:recycle: │ ♻️ │ recycle, actor
:wrench: │ 🔧 │ adjustment, rection, adapter
:gear: │ ⚙️ │ adjustment
:control_knobs: │ 🎛 │ config, adjustment
:bug: │ 🐛 │ bug
:zap: │ ⚡️ │ speeded
:bar_chart: │ 📊 │ analytics, chart
:chart_with_upwards_trend: │ 📈 │ analytics, chart, upwards
:package: │ 📦 │ package, wrap, ture
:fire: │ 🔥 │ fire, fix
:sparkles: │ ✨ │ new, feature
:nail_care: │ 💅 │ styles, prettify
:art: │ 🎨 │ styles, colors
:lipstick: │ 💄 │ styles, prettify
:white_check_mark: │ ✅ │ check, done
:test_tube: │ 🧪 │ test, testing
:pencil: │ 📝 │ docs
:warning: │ ⚠️ │ warning
:no_entry_sign: │ 🚫 │ cancel
:rotating_light: │ 🚨 │ alert, ect
:mag_right: │ 🔎 │ search
:old_key: │ 🗝 │ dentials
:rocket: │ 🚀 │ shipping
:stopwatch: │ ⏱ │ speed, performance
:wheelchair: │ ♿️ │ accessibility, a11y
:globe_with_meridians: │ 🌐 │ intl, i18n, i10n, tradus, lang
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
type="$(cat ~/.config/nvim/tasks/assets/conventional_commits_types.txt | fzf | awk -F' ' '{print $1 ": "}')"
emoji="$(cat ~/.config/nvim/tasks/assets/emoji_list.txt | fzf | awk -F' ' '{print $3 " "}')"
branch="$(git branch --show-current | awk -F'/' '{if ($2) print " [" $2 "] "}')"
message="$type$branch$emoji"
echo -n "$message"
read body
git commit -m "$message$body"