29092024
This commit is contained in:
parent
9de3a488a7
commit
dff4d40b46
9 changed files with 79 additions and 104 deletions
|
@ -7,8 +7,8 @@
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
|
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
|
||||||
"everforest": { "branch": "master", "commit": "93b89630861a4c8a1be07bc54f6d53487acb2e57" },
|
"everforest": { "branch": "master", "commit": "e5b9e2fb676a9ded3e86ae51924f7962fa4fb0ac" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
"friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
|
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
|
||||||
"hardtime.nvim": { "branch": "main", "commit": "6513bf42cd9261669d1ee41ff8b4065dfdc53a09" },
|
"hardtime.nvim": { "branch": "main", "commit": "6513bf42cd9261669d1ee41ff8b4065dfdc53a09" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
||||||
|
@ -25,17 +25,17 @@
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
|
"nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "c823e2d0621b5c15aa6b46be4d69b1379bcb8fa6" },
|
"nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "f4fef355efa3c5d0813512480ee7b2c050b09fe4" },
|
"nvim-lspconfig": { "branch": "master", "commit": "76e7c8b029e6517f3689390d6599e9b446551704" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "8405ecfbd6bb08a94ffc9c68fef211eea56e8a3b" },
|
"nvim-tree.lua": { "branch": "master", "commit": "1ae1c33ce1f4f600dbb9dd8a15b95fbd215358e3" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "929ca9c76ee20bb27cffbde4ee90583b6c54d616" },
|
"nvim-treesitter": { "branch": "master", "commit": "707313b80a2f1e65fa06dba2052cc49ce6762a60" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "3d5390c49e3f8fe457b376df2a49aa39d75b7911" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "f0a601989fe02ed717bb4ca43e1039e15de3e6c8" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" },
|
"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" },
|
"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" },
|
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
||||||
"tagbar": { "branch": "master", "commit": "d55d454bd3d5b027ebf0e8c75b8f88e4eddad8d8" },
|
"tagbar": { "branch": "master", "commit": "d55d454bd3d5b027ebf0e8c75b8f88e4eddad8d8" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
|
|
@ -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
|
-- highlight on yank
|
||||||
local highlight_yank_group = vim.api.nvim_create_augroup("HighlightYankGroup", {})
|
local highlight_yank_group = vim.api.nvim_create_augroup("HighlightYankGroup", {})
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
|
|
@ -12,14 +12,14 @@ mapkey("<leader>m", "NvimTreeFocus", "n")
|
||||||
mapkey("<leader>e", "NvimTreeToggle", "n")
|
mapkey("<leader>e", "NvimTreeToggle", "n")
|
||||||
|
|
||||||
-- Pane and Window Navigation
|
-- Pane and Window Navigation
|
||||||
mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
|
-- mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
|
||||||
mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
|
-- mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
|
||||||
mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
|
-- mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
|
||||||
mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
|
-- mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
|
||||||
mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
|
-- mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
|
||||||
mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
|
-- mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
|
||||||
mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
|
-- mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
|
||||||
mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
|
-- mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
|
||||||
mapkey("<C-h>", "TmuxNavigateLeft", "n") -- Navigate Left
|
mapkey("<C-h>", "TmuxNavigateLeft", "n") -- Navigate Left
|
||||||
mapkey("<C-j>", "TmuxNavigateDown", "n") -- Navigate Down
|
mapkey("<C-j>", "TmuxNavigateDown", "n") -- Navigate Down
|
||||||
mapkey("<C-k>", "TmuxNavigateUp", "n") -- Navigate Up
|
mapkey("<C-k>", "TmuxNavigateUp", "n") -- Navigate Up
|
||||||
|
@ -36,24 +36,12 @@ mapkey("<C-Right>", "vertical resize -2", "n")
|
||||||
-- Show Full File-Path
|
-- Show Full File-Path
|
||||||
mapkey("<leader>pa", "echo expand('%:p')", "n") -- Show Full File Path
|
mapkey("<leader>pa", "echo expand('%:p')", "n") -- Show Full File Path
|
||||||
|
|
||||||
-- Notes
|
|
||||||
-- mapkey("<leader>ng", "Neorg workspace general", "n")
|
|
||||||
-- mapkey("<leader>nw", "Neorg workspace work", "n")
|
|
||||||
-- mapkey("<leader>ny", "Neorg workspace youtube", "n")
|
|
||||||
|
|
||||||
-- Indenting
|
-- Indenting
|
||||||
vim.keymap.set("v", "<", "<gv", { silent = true, noremap = true })
|
vim.keymap.set("v", "<", "<gv", { silent = true, noremap = true })
|
||||||
vim.keymap.set("v", ">", ">gv", { silent = true, noremap = true })
|
vim.keymap.set("v", ">", ">gv", { silent = true, noremap = true })
|
||||||
|
|
||||||
local api = vim.api
|
local api = vim.api
|
||||||
|
|
||||||
-- Zen Mode
|
|
||||||
-- api.nvim_set_keymap("n", "<leader>zn", ":TZNarrow<CR>", {})
|
|
||||||
-- api.nvim_set_keymap("v", "<leader>zn", ":'<,'>TZNarrow<CR>", {})
|
|
||||||
-- api.nvim_set_keymap("n", "<leader>sm", ":TZFocus<CR>", {})
|
|
||||||
-- api.nvim_set_keymap("n", "<leader>zm", ":TZMinimalist<CR>", {})
|
|
||||||
-- api.nvim_set_keymap("n", "<leader>za", ":TZAtaraxis<CR>", {})
|
|
||||||
|
|
||||||
-- Comments
|
-- Comments
|
||||||
api.nvim_set_keymap("n", "<C-_>", "gtc", { noremap = false })
|
api.nvim_set_keymap("n", "<C-_>", "gtc", { noremap = false })
|
||||||
api.nvim_set_keymap("v", "<C-_>", "goc", { noremap = false })
|
api.nvim_set_keymap("v", "<C-_>", "goc", { noremap = false })
|
||||||
|
|
|
@ -8,16 +8,19 @@ opt.tabstop = 2
|
||||||
opt.shiftwidth = 2
|
opt.shiftwidth = 2
|
||||||
opt.softtabstop = 2
|
opt.softtabstop = 2
|
||||||
opt.expandtab = true
|
opt.expandtab = true
|
||||||
|
opt.autoindent = true
|
||||||
opt.smartindent = true
|
opt.smartindent = true
|
||||||
opt.wrap = false
|
opt.wrap = false
|
||||||
|
opt.shiftwidth = 2
|
||||||
|
|
||||||
-- Search
|
-- Search
|
||||||
opt.incsearch = true
|
opt.incsearch = true
|
||||||
opt.ignorecase = true
|
opt.ignorecase = true
|
||||||
opt.smartcase = true
|
opt.smartcase = true
|
||||||
opt.hlsearch = false
|
opt.hlsearch = true
|
||||||
|
|
||||||
-- Appearance
|
-- Appearance
|
||||||
|
opt.title = true
|
||||||
opt.number = true
|
opt.number = true
|
||||||
opt.relativenumber = false
|
opt.relativenumber = false
|
||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
|
@ -32,9 +35,24 @@ opt.showmode = false
|
||||||
-- opt.tabline = '%!v:lua.require("utils").tabline()'
|
-- opt.tabline = '%!v:lua.require("utils").tabline()'
|
||||||
opt.conceallevel = 2
|
opt.conceallevel = 2
|
||||||
opt.breakindent = true
|
opt.breakindent = true
|
||||||
opt.breakindentopt = "shift:2"
|
|
||||||
|
|
||||||
-- Behaviour
|
-- 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.hidden = true
|
||||||
opt.errorbells = false
|
opt.errorbells = false
|
||||||
opt.swapfile = false
|
opt.swapfile = false
|
||||||
|
@ -46,12 +64,13 @@ opt.splitright = true
|
||||||
opt.splitbelow = true
|
opt.splitbelow = true
|
||||||
opt.autochdir = false
|
opt.autochdir = false
|
||||||
opt.iskeyword:append("-")
|
opt.iskeyword:append("-")
|
||||||
opt.mouse:append("a")
|
opt.mouse = ""
|
||||||
opt.clipboard:append("unnamedplus")
|
opt.clipboard:append("unnamedplus")
|
||||||
opt.modifiable = true
|
opt.modifiable = true
|
||||||
-- opt.guicursor =
|
-- 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"
|
-- "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.encoding = "UTF-8"
|
||||||
|
opt.fileencoding = "utf-8"
|
||||||
opt.cursorline = false
|
opt.cursorline = false
|
||||||
|
|
||||||
-- spell
|
-- spell
|
||||||
|
|
|
@ -2,7 +2,7 @@ local config = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = "auto",
|
theme = "auto",
|
||||||
globalstatus = true,
|
globalstatus = false,
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = {},
|
statusline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
|
@ -19,46 +19,54 @@ local config = {
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "" },
|
lualine_b = { "" },
|
||||||
lualine_x = { "diagnostics", "encoding", "fileformat", "filetype" },
|
lualine_x = { "diagnostics", "filetype" },
|
||||||
lualine_y = { "progress" },
|
lualine_y = { "progress" },
|
||||||
lualine_z = { "location" },
|
lualine_z = { "location" },
|
||||||
lualine_c = {},
|
lualine_c = {},
|
||||||
},
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "location" },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
inactive_winbar = {},
|
inactive_winbar = {},
|
||||||
extensions = {},
|
extensions = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
local function ins_left(component)
|
-- local function ins_left(component)
|
||||||
table.insert(config.sections.lualine_c, component)
|
-- table.insert(config.sections.lualine_c, component)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local function ins_right(component)
|
-- local function ins_right(component)
|
||||||
table.insert(config.sections.lualine_x, 1, component)
|
-- table.insert(config.sections.lualine_x, 1, component)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
ins_right({
|
-- ins_right({
|
||||||
-- Lsp server name .
|
-- -- Lsp server name .
|
||||||
function()
|
-- function()
|
||||||
local msg = "No Active Lsp"
|
-- local msg = "No Active Lsp"
|
||||||
-- local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
|
-- -- local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
|
||||||
local buf_ft = vim.bo.filetype
|
-- local buf_ft = vim.bo.filetype
|
||||||
local clients = vim.lsp.get_clients()
|
-- local clients = vim.lsp.get_clients()
|
||||||
if next(clients) == nil then
|
-- if next(clients) == nil then
|
||||||
return msg
|
-- return msg
|
||||||
end
|
-- end
|
||||||
for _, client in ipairs(clients) do
|
-- for _, client in ipairs(clients) do
|
||||||
local filetypes = client.config.filetypes
|
-- local filetypes = client.config.filetypes
|
||||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
-- if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||||
return client.name
|
-- return client.name
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
return msg
|
-- return msg
|
||||||
end,
|
-- end,
|
||||||
icon = " LSP:",
|
-- icon = " LSP:",
|
||||||
color = { fg = "#ff6b6b" },
|
-- color = { fg = "#ff6b6b" },
|
||||||
})
|
-- })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- TODO what is it for lol?
|
||||||
return {
|
return {
|
||||||
"godlygeek/tabular",
|
"godlygeek/tabular",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- TODO need to test
|
||||||
return {
|
return {
|
||||||
"preservim/tagbar",
|
"preservim/tagbar",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|
|
@ -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
|
|
|
@ -121,7 +121,7 @@ alias ehledger='nvim ~/PKM/ledger/2024.journal'
|
||||||
alias cclear="reset && tmux clear-history && cd"
|
alias cclear="reset && tmux clear-history && cd"
|
||||||
## git
|
## git
|
||||||
alias s_diary="cd ~/PKM/diary/ && git commit -am \"\$(date +%Y%m%d)\" && git push origin master ; cd ~"
|
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
|
# Preferred editor for local and remote sessions
|
||||||
export EDITOR='nvim'
|
export EDITOR='nvim'
|
||||||
|
|
Loading…
Add table
Reference in a new issue