Update 2025-10-31

update 2025-10-08

chore: update readme

Update 2025-10-09

Update 2025-10-15

Update 2025-10-22

Update 2025-10-31
This commit is contained in:
2025-10-08 19:54:46 +03:00
parent f7194a919e
commit f5c52bcc9d
65 changed files with 1052 additions and 1721 deletions

View File

@@ -48,13 +48,6 @@ vim.api.nvim_create_autocmd({ "InsertEnter" }, {
end,
})
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
pattern = "**/Codnity/**",
callback = function()
vim.opt.colorcolumn = "92"
end,
})
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
pattern = "requirements*.txt",
callback = function()
@@ -62,13 +55,6 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
end,
})
--[[ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
pattern = "**/Codnity/**/*.html",
callback = function()
vim.cmd("setf htmldjango")
end,
}) ]]
-- Autocommand that sources neovim files on save
--[[ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
group = vim.api.nvim_create_augroup("AutoReloadConfig", { clear = true }),

View File

@@ -39,20 +39,12 @@ nmap("<C-Right>", "<cmd>vertical resize +2<cr>", "Resize window right")
nmap("<A-k>", "<cmd>m .-2<cr>==", "Move line up")
nmap("<A-j>", "<cmd>m .+1<cr>==", "Move line down")
-- nmap("<S-s>", ":%s/<C-r><C-w>/<C-r><C-w>/gI<Left><Left><Left>", "[S]ubstitute word")
nmap("<S-s>", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], "[S]ubstitute word")
nmap("Q", "@qj", "Run macro")
nmap("<leader>oo", "<cmd>update<cr><cmd>source<cr>", "Source current file")
-- vim.keymap.set({ "n", "v", "x" }, "<leader>y", '"+y', { desc = "Yank to system clipboard" })
-- vim.keymap.set("n", "<leader>Y", '"+yy', { desc = "Yank line to system clipboard" })
-- vim.keymap.set({ "n", "v", "x" }, "<leader>p", '"+p', { desc = "Paste from system clipboard" })
-- vim.keymap.set("n", "<leader>P", '"+P', { desc = "Paste before cursor from system clipboard" })
vim.keymap.set("n", "<leader>cf", function()
local file_path = vim.fn.expand("%:p")
vim.cmd([[call setreg("+", "]] .. vim.fn.escape(file_path, '\\ "') .. '")')
@@ -60,8 +52,8 @@ vim.keymap.set("n", "<leader>cf", function()
end, { desc = "Copy file path to clipboard" })
xmap("Q", ":norm @q<CR>", "Run macro")
xmap("p", '"_dP')
vim.keymap.set(
"c",
"<C-j>",
@@ -80,11 +72,6 @@ vmap("<", "<gv", "Left Indent")
vmap("<A-k>", ":m '<-2<cr>gv=gv", "Move lines up")
vmap("<A-j>", ":m '>+1<cr>gv=gv", "Move lines down")
-- tmap("t", "<C-h>", "<C-\\><C-N><C-w>h")
-- tmap("t", "<C-j>", "<C-\\><C-N><C-w>j")
-- tmap("t", "<C-k>", "<C-\\><C-N><C-w>k")
-- tmap("t", "<C-l>", "<C-\\><C-N><C-w>l")
local function fzf_sesh_connect()
-- build the fzf-tmux command exactly as in your zsh widget
local fzf_cmd = [[

View File

@@ -28,9 +28,6 @@ require("lazy").setup({
ui = { border = "rounded" },
change_detection = { enabled = false },
rocks = {
hererocks = nil,
},
dev = {
path = "~/repos/nvim/plugins",
hererocks = true,
},
})

View File

@@ -1,57 +1,57 @@
vim.opt.backup = false -- creates a backup file
vim.opt.breakindent = true -- Enable break indent
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
vim.opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
vim.opt.backup = false -- creates a backup file
vim.opt.breakindent = true -- Enable break indent
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
vim.opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
vim.opt.colorcolumn = "120"
vim.opt.completeopt = { "menuone", "noselect" } -- mostly just for cmp
vim.opt.conceallevel = 2 -- so that `` is visible in markdown files
vim.opt.cursorcolumn = true -- highlight the current column
vim.opt.cursorline = true -- highlight the current line
vim.opt.expandtab = true -- convert tabs to spaces
vim.opt.fileencoding = "utf-8" -- the encoding written to a file
vim.opt.conceallevel = 2 -- so that `` is visible in markdown files
vim.opt.cursorcolumn = true -- highlight the current column
vim.opt.cursorline = true -- highlight the current line
vim.opt.expandtab = true -- convert tabs to spaces
vim.opt.fileencoding = "utf-8" -- the encoding written to a file
vim.opt.fillchars.eob = " "
vim.opt.foldmethod = "manual"
vim.opt.foldenable = true
vim.opt.foldlevelstart = 99
vim.opt.foldcolumn = "1" -- '0' is not bad
vim.opt.foldcolumn = "1" -- '0' is not bad
vim.opt.guifont = "JetBrainsMono NF:h11" -- the font used in graphical neovim applications
vim.opt.hlsearch = false -- highlight all matches on previous search pattern
vim.opt.ignorecase = true -- ignore case in search patterns
vim.opt.hlsearch = false -- highlight all matches on previous search pattern
vim.opt.ignorecase = true -- ignore case in search patterns
vim.opt.incsearch = true
vim.opt.isfname:append("@-@")
vim.opt.iskeyword:append("-")
vim.opt.laststatus = 3
vim.opt.mouse = "a" -- allow the mouse to be used in neovim
vim.opt.number = true -- set numbered lines
vim.opt.numberwidth = 4 -- set number column width to 4 {default 4}
vim.opt.pumheight = 10 -- pop up menu height
vim.opt.mouse = "a" -- allow the mouse to be used in neovim
vim.opt.number = true -- set numbered lines
vim.opt.numberwidth = 4 -- set number column width to 4 {default 4}
vim.opt.pumheight = 10 -- pop up menu height
vim.opt.relativenumber = true -- set relative numbered lines
vim.opt.ruler = false
vim.opt.scrolloff = 8 -- is one of my fav
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
vim.opt.scrolloff = 8 -- is one of my fav
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
vim.opt.shortmess:append("c")
vim.opt.showcmd = false
vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
vim.opt.showtabline = 0 -- disable tabs
vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
vim.opt.showtabline = 0 -- disable tabs
vim.opt.sidescrolloff = 8
vim.opt.signcolumn = "yes" -- always show the sign column otherwise it would shift the text each time
vim.opt.smartcase = true -- smart case
vim.opt.signcolumn = "auto" -- always show the sign column otherwise it would shift the text each time
vim.opt.smartcase = true -- smart case
vim.opt.smartindent = true -- make indenting smarter again
vim.opt.softtabstop = 4
vim.opt.spell = false
vim.opt.spelloptions:append("camel")
vim.opt.splitbelow = true -- force all horizontal splits to go below current window
vim.opt.splitright = true -- force all vertical splits to go to the right of current window
vim.opt.swapfile = false -- creates a swapfile
vim.opt.tabstop = 4 -- insert 4 spaces for a tab
vim.opt.splitbelow = true -- force all horizontal splits to go below current window
vim.opt.splitright = true -- force all vertical splits to go to the right of current window
vim.opt.swapfile = false -- creates a swapfile
vim.opt.tabstop = 4 -- insert 4 spaces for a tab
vim.opt.termguicolors = true -- set term gui colors (most terminals support this)
vim.opt.timeoutlen = 250 -- time to wait for a mapped sequence to complete (in milliseconds)
vim.opt.timeoutlen = 250 -- time to wait for a mapped sequence to complete (in milliseconds)
vim.opt.undodir = vim.fn.stdpath("data") .. "/nvim/undodir"
vim.opt.undofile = true -- enable persistent undo
vim.opt.updatetime = 50 -- faster completion (4000ms default)
vim.opt.undofile = true -- enable persistent undo
vim.opt.updatetime = 50 -- faster completion (4000ms default)
vim.opt.whichwrap:append("<,>,[,],h,l")
vim.opt.wrap = false -- display lines as one long line
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edit
vim.opt.wrap = false -- display lines as one long line
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edit
vim.opt_local.path:prepend(vim.fn.stdpath("config") .. "/lua")
vim.opt_local.suffixesadd:prepend(".lua")
vim.opt_local.suffixesadd:prepend("init.lua")

View File

@@ -1,78 +0,0 @@
if not pcall(require, "luasnip") then
return
end
local ls = require("luasnip")
local f = ls.function_node
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
--[[
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local events = require("luasnip.util.events")
local ai = require("luasnip.nodes.absolute_indexer")
local extras = require("luasnip.extras")
local l = extras.lambda
local rep = extras.rep
local p = extras.partial
local m = extras.match
local n = extras.nonempty
local dl = extras.dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
local postfix = require("luasnip.extras.postfix").postfix
local types = require("luasnip.util.types")
local parse = require("luasnip.util.parser").parse_snippet
local ms = ls.multi_snippet
]]
local shortcut = function(val)
if type(val) == "string" then
return { t({ val }), i(0) }
end
if type(val) == "table" then
for k, v in ipairs(val) do
if type(v) == "string" then
val[k] = t({ v })
end
end
end
return val
end
local M = {}
M.same = function(index)
return f(function(args)
return args[1]
end, { index })
end
M.year = function()
return os.date("%Y")
end
M.date = function()
return os.date("%d.%m.%Y")
end
M.make = function(tbl)
local result = {}
for k, v in pairs(tbl) do
table.insert(result, (s({ trig = k, desc = v.desc }, shortcut(v))))
end
return result
end
return M