diff --git a/global/.config/nvim/lazy-lock.json b/global/.config/nvim/lazy-lock.json index 22f4ce7..7ef6c34 100644 --- a/global/.config/nvim/lazy-lock.json +++ b/global/.config/nvim/lazy-lock.json @@ -7,8 +7,8 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, - "everforest": { "branch": "master", "commit": "93b89630861a4c8a1be07bc54f6d53487acb2e57" }, - "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, + "everforest": { "branch": "master", "commit": "e5b9e2fb676a9ded3e86ae51924f7962fa4fb0ac" }, + "friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" }, "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, "hardtime.nvim": { "branch": "main", "commit": "6513bf42cd9261669d1ee41ff8b4065dfdc53a09" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, @@ -25,17 +25,17 @@ "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lint": { "branch": "master", "commit": "c823e2d0621b5c15aa6b46be4d69b1379bcb8fa6" }, - "nvim-lspconfig": { "branch": "master", "commit": "f4fef355efa3c5d0813512480ee7b2c050b09fe4" }, + "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" }, + "nvim-lspconfig": { "branch": "master", "commit": "76e7c8b029e6517f3689390d6599e9b446551704" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, - "nvim-tree.lua": { "branch": "master", "commit": "8405ecfbd6bb08a94ffc9c68fef211eea56e8a3b" }, - "nvim-treesitter": { "branch": "master", "commit": "929ca9c76ee20bb27cffbde4ee90583b6c54d616" }, - "nvim-treesitter-context": { "branch": "master", "commit": "3d5390c49e3f8fe457b376df2a49aa39d75b7911" }, + "nvim-tree.lua": { "branch": "master", "commit": "1ae1c33ce1f4f600dbb9dd8a15b95fbd215358e3" }, + "nvim-treesitter": { "branch": "master", "commit": "707313b80a2f1e65fa06dba2052cc49ce6762a60" }, + "nvim-treesitter-context": { "branch": "master", "commit": "f0a601989fe02ed717bb4ca43e1039e15de3e6c8" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, - "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, + "nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "render-markdown.nvim": { "branch": "main", "commit": "edd919c88c5c9edf63ce0778ce18c5a41cfd4f1b" }, + "render-markdown.nvim": { "branch": "main", "commit": "d3a565eb4c46005a390d4b19f80f9ad719607df6" }, "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, "tagbar": { "branch": "master", "commit": "d55d454bd3d5b027ebf0e8c75b8f88e4eddad8d8" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, diff --git a/global/.config/nvim/lua/core/autocmds.lua b/global/.config/nvim/lua/core/autocmds.lua index af4c439..2a05435 100644 --- a/global/.config/nvim/lua/core/autocmds.lua +++ b/global/.config/nvim/lua/core/autocmds.lua @@ -1,19 +1,3 @@ --- local helpers = require("core.helpers") --- auto-format on save --- local lsp_fmt_group = vim.api.nvim_create_augroup("LspFormattingGroup", {}) --- vim.api.nvim_create_autocmd("BufWritePre", { --- group = lsp_fmt_group, --- callback = function() --- local efm = vim.lsp.get_clients({ name = "efm" }) --- --- if vim.tbl_isempty(efm) then --- return --- end --- --- vim.lsp.buf.format({ name = "efm", async = true }) --- end, --- }) - -- highlight on yank local highlight_yank_group = vim.api.nvim_create_augroup("HighlightYankGroup", {}) vim.api.nvim_create_autocmd("TextYankPost", { diff --git a/global/.config/nvim/lua/core/keymaps.lua b/global/.config/nvim/lua/core/keymaps.lua index 23f76e8..fd48b30 100644 --- a/global/.config/nvim/lua/core/keymaps.lua +++ b/global/.config/nvim/lua/core/keymaps.lua @@ -12,14 +12,14 @@ mapkey("m", "NvimTreeFocus", "n") mapkey("e", "NvimTreeToggle", "n") -- Pane and Window Navigation -mapkey("", "h", "n") -- Navigate Left -mapkey("", "j", "n") -- Navigate Down -mapkey("", "k", "n") -- Navigate Up -mapkey("", "l", "n") -- Navigate Right -mapkey("", "wincmd h", "t") -- Navigate Left -mapkey("", "wincmd j", "t") -- Navigate Down -mapkey("", "wincmd k", "t") -- Navigate Up -mapkey("", "wincmd l", "t") -- Navigate Right +-- mapkey("", "h", "n") -- Navigate Left +-- mapkey("", "j", "n") -- Navigate Down +-- mapkey("", "k", "n") -- Navigate Up +-- mapkey("", "l", "n") -- Navigate Right +-- mapkey("", "wincmd h", "t") -- Navigate Left +-- mapkey("", "wincmd j", "t") -- Navigate Down +-- mapkey("", "wincmd k", "t") -- Navigate Up +-- mapkey("", "wincmd l", "t") -- Navigate Right mapkey("", "TmuxNavigateLeft", "n") -- Navigate Left mapkey("", "TmuxNavigateDown", "n") -- Navigate Down mapkey("", "TmuxNavigateUp", "n") -- Navigate Up @@ -36,24 +36,12 @@ mapkey("", "vertical resize -2", "n") -- Show Full File-Path mapkey("pa", "echo expand('%:p')", "n") -- Show Full File Path --- Notes --- mapkey("ng", "Neorg workspace general", "n") --- mapkey("nw", "Neorg workspace work", "n") --- mapkey("ny", "Neorg workspace youtube", "n") - -- Indenting vim.keymap.set("v", "<", "", ">gv", { silent = true, noremap = true }) local api = vim.api --- Zen Mode --- api.nvim_set_keymap("n", "zn", ":TZNarrow", {}) --- api.nvim_set_keymap("v", "zn", ":'<,'>TZNarrow", {}) --- api.nvim_set_keymap("n", "sm", ":TZFocus", {}) --- api.nvim_set_keymap("n", "zm", ":TZMinimalist", {}) --- api.nvim_set_keymap("n", "za", ":TZAtaraxis", {}) - -- Comments api.nvim_set_keymap("n", "", "gtc", { noremap = false }) api.nvim_set_keymap("v", "", "goc", { noremap = false }) diff --git a/global/.config/nvim/lua/core/options.lua b/global/.config/nvim/lua/core/options.lua index b1ad302..a081ef2 100644 --- a/global/.config/nvim/lua/core/options.lua +++ b/global/.config/nvim/lua/core/options.lua @@ -8,16 +8,19 @@ opt.tabstop = 2 opt.shiftwidth = 2 opt.softtabstop = 2 opt.expandtab = true +opt.autoindent = true opt.smartindent = true opt.wrap = false +opt.shiftwidth = 2 -- Search opt.incsearch = true opt.ignorecase = true opt.smartcase = true -opt.hlsearch = false +opt.hlsearch = true -- Appearance +opt.title = true opt.number = true opt.relativenumber = false opt.termguicolors = true @@ -32,9 +35,24 @@ opt.showmode = false -- opt.tabline = '%!v:lua.require("utils").tabline()' opt.conceallevel = 2 opt.breakindent = true -opt.breakindentopt = "shift:2" -- Behaviour +vim.opt.wildignore:append({ + "*/node_modules/*", + "*.o", + "*.a", + "*.class", + "*.pyc", + "*/.git/*", + "*/dist/*", + "*/venv/*", + "*/__pycache__/*", +}) +opt.splitkeep = "cursor" +opt.shell = "zsh" +opt.showcmd = true +opt.laststatus = 2 +opt.expandtab = true opt.hidden = true opt.errorbells = false opt.swapfile = false @@ -46,12 +64,13 @@ opt.splitright = true opt.splitbelow = true opt.autochdir = false opt.iskeyword:append("-") -opt.mouse:append("a") +opt.mouse = "" opt.clipboard:append("unnamedplus") opt.modifiable = true -- opt.guicursor = -- "n-v-c:block,i-ci-ve:block,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175" opt.encoding = "UTF-8" +opt.fileencoding = "utf-8" opt.cursorline = false -- spell diff --git a/global/.config/nvim/lua/plugins/lualine-nvim.lua b/global/.config/nvim/lua/plugins/lualine-nvim.lua index 2e42edd..61c7b5b 100644 --- a/global/.config/nvim/lua/plugins/lualine-nvim.lua +++ b/global/.config/nvim/lua/plugins/lualine-nvim.lua @@ -2,7 +2,7 @@ local config = { options = { icons_enabled = true, theme = "auto", - globalstatus = true, + globalstatus = false, disabled_filetypes = { statusline = {}, winbar = {}, @@ -19,46 +19,54 @@ local config = { sections = { lualine_a = { "mode" }, lualine_b = { "" }, - lualine_x = { "diagnostics", "encoding", "fileformat", "filetype" }, + lualine_x = { "diagnostics", "filetype" }, lualine_y = { "progress" }, lualine_z = { "location" }, lualine_c = {}, }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, tabline = {}, winbar = {}, inactive_winbar = {}, extensions = {}, } -local function ins_left(component) - table.insert(config.sections.lualine_c, component) -end +-- local function ins_left(component) +-- table.insert(config.sections.lualine_c, component) +-- end -local function ins_right(component) - table.insert(config.sections.lualine_x, 1, component) -end +-- local function ins_right(component) +-- table.insert(config.sections.lualine_x, 1, component) +-- end -ins_right({ - -- Lsp server name . - function() - local msg = "No Active Lsp" - -- local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") - local buf_ft = vim.bo.filetype - local clients = vim.lsp.get_clients() - if next(clients) == nil then - return msg - end - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return client.name - end - end - return msg - end, - icon = " LSP:", - color = { fg = "#ff6b6b" }, -}) +-- ins_right({ +-- -- Lsp server name . +-- function() +-- local msg = "No Active Lsp" +-- -- local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") +-- local buf_ft = vim.bo.filetype +-- local clients = vim.lsp.get_clients() +-- if next(clients) == nil then +-- return msg +-- end +-- for _, client in ipairs(clients) do +-- local filetypes = client.config.filetypes +-- if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then +-- return client.name +-- end +-- end +-- return msg +-- end, +-- icon = " LSP:", +-- color = { fg = "#ff6b6b" }, +-- }) return { "nvim-lualine/lualine.nvim", diff --git a/global/.config/nvim/lua/plugins/tabular.lua b/global/.config/nvim/lua/plugins/tabular.lua index 5e40e8f..ffc49f0 100644 --- a/global/.config/nvim/lua/plugins/tabular.lua +++ b/global/.config/nvim/lua/plugins/tabular.lua @@ -1,3 +1,4 @@ +-- TODO what is it for lol? return { "godlygeek/tabular", lazy = false, diff --git a/global/.config/nvim/lua/plugins/tagbar.lua b/global/.config/nvim/lua/plugins/tagbar.lua index f8531c1..df7ceb5 100644 --- a/global/.config/nvim/lua/plugins/tagbar.lua +++ b/global/.config/nvim/lua/plugins/tagbar.lua @@ -1,3 +1,4 @@ +-- TODO need to test return { "preservim/tagbar", lazy = false, diff --git a/global/.config/nvim/lua/utils/init.lua b/global/.config/nvim/lua/utils/init.lua deleted file mode 100644 index 6999d98..0000000 --- a/global/.config/nvim/lua/utils/init.lua +++ /dev/null @@ -1,26 +0,0 @@ -local M = {} - -function M.tabline() - local s = "" - for i = 1, vim.fn.tabpagenr("$") do - local winnr = vim.fn.tabpagewinnr(i) - local buflist = vim.fn.tabpagebuflist(i) - local bufnr = buflist[winnr] - local bufname = vim.fn.bufname(bufnr) - local filename = vim.fn.fnamemodify(bufname, ":t") - local icon = require("nvim-web-devicons").get_icon(filename) - - -- Отмечаем активный таб - if i == vim.fn.tabpagenr() then - s = s .. "%#TabLineSel#" - else - s = s .. "%#TabLine#" - end - - s = s .. " " .. (icon or "") .. " " .. filename .. " " - end - s = s .. "%#TabLineFill#%=" - return s -end - -return M diff --git a/global/.zshrc b/global/.zshrc index b1a7377..bc6fee3 100644 --- a/global/.zshrc +++ b/global/.zshrc @@ -121,7 +121,7 @@ alias ehledger='nvim ~/PKM/ledger/2024.journal' alias cclear="reset && tmux clear-history && cd" ## git alias s_diary="cd ~/PKM/diary/ && git commit -am \"\$(date +%Y%m%d)\" && git push origin master ; cd ~" -alias s_ledger="cd ~/PKM/ledger/ && git commit -am \"\$(date +%Y%m%d)\" && git push origin master ; cd" +alias s_ledger="cd ~/PKM/ledger/ && git commit -am \"\$(date +%Y%m%d)\" && git push origin master ; cd ~" # Preferred editor for local and remote sessions export EDITOR='nvim'