This commit is contained in:
fz0x1 2024-09-29 16:08:33 +02:00
parent 9de3a488a7
commit dff4d40b46
9 changed files with 79 additions and 104 deletions

View file

@ -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", {

View file

@ -12,14 +12,14 @@ mapkey("<leader>m", "NvimTreeFocus", "n")
mapkey("<leader>e", "NvimTreeToggle", "n")
-- Pane and Window Navigation
mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
-- mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
-- mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
-- mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
-- mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
-- mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
-- mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
-- mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
-- mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
mapkey("<C-h>", "TmuxNavigateLeft", "n") -- Navigate Left
mapkey("<C-j>", "TmuxNavigateDown", "n") -- Navigate Down
mapkey("<C-k>", "TmuxNavigateUp", "n") -- Navigate Up
@ -36,24 +36,12 @@ mapkey("<C-Right>", "vertical resize -2", "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
vim.keymap.set("v", "<", "<gv", { silent = true, noremap = true })
vim.keymap.set("v", ">", ">gv", { silent = true, noremap = true })
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
api.nvim_set_keymap("n", "<C-_>", "gtc", { noremap = false })
api.nvim_set_keymap("v", "<C-_>", "goc", { noremap = false })

View file

@ -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