This commit is contained in:
2026-04-21 23:24:25 +02:00
parent 4519c8bf89
commit ba7ea483b0
13 changed files with 192 additions and 159 deletions

View File

@@ -14,16 +14,15 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
-- opts.rocks.enabled = false
vim.g.mapleader = " "
local plugins = {
-- "wbthomason/packer.nvim",
{
"nvim-telescope/telescope.nvim",
version = "0.1.8",
-- or , branch = "0.1.x",
dependencies = { { "nvim-lua/plenary.nvim" } }
version = "0.2.1",
dependencies = { { "nvim-lua/plenary.nvim" },
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
},
},
{
"rose-pine/neovim",
@@ -32,56 +31,43 @@ local plugins = {
vim.cmd("colorscheme rose-pine")
end
},
{
"nvim-treesitter/nvim-treesitter",
tag = "v0.10.0",
lazy = false,
build = ":TSUpdate"
-- build = function()
-- -- local ts_update = require("nvim-treesitter.install").update({ with_sync = true })
-- -- ts_update()
-- end
},
{ "nvim-treesitter/nvim-treesitter", branch = "main", lazy = false, build = ":TSUpdate" },
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" }
},
-- "theprimeagen/harpoon",
"mbbill/undotree",
"tpope/vim-fugitive",
-- ("christoomey/vim-tmux-navigator")
-- "huggingface/llm.nvim",
"subnut/nvim-ghost.nvim",
"unblevable/quick-scope",
-- ({
-- "kr40/nvim-macros",
-- cmd = {"MacroSave", "MacroYank", "MacroSelect", "MacroDelete"},
-- opts = {
-- json_file_path = vim.fs.normalize(vim.fn.stdpath("config") .. "/macros.json"), -- Location where the macros will be stored
-- default_macro_register = "q", -- Use name default register for :MacroYank and :MacroSave and :MacroSelect Raw functions
-- json_formatter = "none", -- can be "none" | "jq" | "yq" used to pretty print the json file (jq or yq must be installed!)
-- }
-- })
-- "unblevable/quick-scope",
"andweeb/presence.nvim",
"numToStr/Comment.nvim",
-- "echasnovski/mini.align",
{
"epwalsh/obsidian.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim"
'stevearc/oil.nvim',
---@module 'oil'
---@type oil.SetupOpts
opts = {},
-- Optional dependencies
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
},
{
-- The tmux `Prefix + z` behaviour
"szw/vim-maximizer",
keys = {
{ "<leader>z", "<cmd>MaximizerToggle<CR>" },
}
},
"echasnovski/mini.align",
-- use {"kevinhwang91/nvim-ufo", dependencies = "kevinhwang91/promise-async"}
{
"VonHeikemen/lsp-zero.nvim",
branch = "v3.x",
dependencies = {
--- Uncomment the two plugins below if you want to manage the language servers from neovim
{ "williamboman/mason.nvim" },
{ "williamboman/mason-lspconfig.nvim" },
{ "neovim/nvim-lspconfig" },
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp" },
@@ -92,19 +78,14 @@ local plugins = {
"nvim-flutter/flutter-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
-- "stevearc/dressing.nvim", -- optional for vim.ui.select
},
},
{
"goolord/alpha-nvim",
lazy = true,
event = "VimEnter",
-- config = function()
-- require("user.plugins.settings.alpha")
-- end,
cmd = "Alpha",
}, -- Splash Screen
},
}
require("lazy").setup(plugins, {})

View File

@@ -7,7 +7,9 @@ vim.cmd("command! ON ObsidianNew")
vim.keymap.set("n", "<leader>c", ":w<CR>:!cargo<Space>run<CR>")
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
-- vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", "<leader>pv", "<CMD>Oil<CR>", { desc = "Open parent directory" })
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
@@ -32,22 +34,60 @@ vim.keymap.set("v", "<leader>d", "\"_d")
vim.keymap.set("i", "<C-c>", "<Esc>")
vim.keymap.set("n", "Q", "<nop>")
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux display-popup -E \"tmuxss -i\"<CR>")
vim.keymap.set("n", "<leader>f", function()
vim.lsp.buf.format()
end)
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
-- vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
-- vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
vim.keymap.set("n", "<leader>s", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>")
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
for _, mode in ipairs({"n", "v", "i"}) do
for _, mode in ipairs({ "n", "v", "i" }) do
vim.keymap.set(mode, "<RightMouse>", function() end)
vim.keymap.set(mode, "<2-RightMouse>", function() end)
vim.keymap.set(mode, "<3-RightMouse>", function() end)
vim.keymap.set(mode, "<4-RightMouse>", function() end)
end
vim.keymap.set("n", "<C-M>", "<cmd>tabnext +<CR>")
vim.keymap.set("n", "<C-N>", "<cmd>tabnext -<CR>")
vim.keymap.set("n", "<C-t>", "<cmd>tabnew<CR>")
-- vim.keymap.del("n", "<C-w>d")
-- vim.keymap.del("n", "<C-w><C-d>")
vim.keymap.set("n", "<C-w><C-t>", "<cmd>tabclose<CR>")
vim.keymap.set("n", "<space><space>l", "<cmd>source %<CR>")
vim.keymap.set("n", "<space>l", ":.lua<CR>")
vim.keymap.set("v", "<space>l", ":lua<CR>")
local function swap_words()
local start = vim.fn.getpos("'<")[2]
local finish = vim.fn.getpos("'>")[2]
local w1 = vim.fn.input("Word 1: ")
local w2 = vim.fn.input("Word 2: ")
if w1 == "" or w2 == "" then
return
end
local lines = vim.api.nvim_buf_get_lines(0, start - 1, finish, false)
for i, line in ipairs(lines) do
line = line:gsub(vim.pesc(w1), "__TMP__")
line = line:gsub(vim.pesc(w2), w1)
line = line:gsub("__TMP__", w2)
lines[i] = line
end
vim.api.nvim_buf_set_lines(0, start - 1, finish, false, lines)
end
vim.keymap.set("v", "<leader>ws", swap_words, { desc = "Swap two words in selection" })
vim.keymap.set("n", "<leader>ws", swap_words, { desc = "Swap two words in selection" })

View File

@@ -39,7 +39,7 @@ vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
-- vim.opt_local.conceallevel = 1
vim.opt_local.conceallevel = 1
vim.opt.updatetime = 50