Compare commits
No commits in common. "529c159526b6616a15168ac39ef2ba38771cecf2" and "872fe099641aa39f7a314453c35b36ae0ff09996" have entirely different histories.
529c159526
...
872fe09964
7 changed files with 98 additions and 145 deletions
|
@ -42,11 +42,6 @@ if.app-id = 'org.mozilla.firefox'
|
|||
if.window-title-regex-substring = 'Picture-in-Picture'
|
||||
run = 'layout floating'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'app.zen-browser.zen'
|
||||
if.window-title-regex-substring = 'Picture-in-Picture'
|
||||
run = 'layout floating'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'app.zen-browser.zen'
|
||||
if.window-title-regex-substring = 'Bitwarden'
|
||||
|
|
|
@ -48,5 +48,3 @@ end
|
|||
# Set up fzf
|
||||
set -U FZF_DEFAULT_OPTS "--bind 'bs:backward-delete-char/eof'"
|
||||
fzf --fish | source
|
||||
|
||||
starship init fish | source
|
||||
|
|
|
@ -1,61 +1,8 @@
|
|||
git:
|
||||
paging:
|
||||
colorArg: always
|
||||
pager: delta --features lazygit
|
||||
pager: delta --dark --paging=never --syntax-theme base16-256 --diff-so-fancy
|
||||
useConfig: false
|
||||
autoFetch: false
|
||||
gui:
|
||||
nerdFontsVersion: 3
|
||||
|
||||
customCommands:
|
||||
- key: "C"
|
||||
command: "git commit -m '{{ .Form.Type }}{{if .Form.Scopes}}({{ .Form.Scopes }}){{end}}: {{ .Form.Description }}'"
|
||||
description: "commit with commitizen"
|
||||
context: "files"
|
||||
prompts:
|
||||
- type: "menu"
|
||||
title: "Select the type of change you are committing."
|
||||
key: "Type"
|
||||
options:
|
||||
- name: "Feature"
|
||||
description: "a new feature"
|
||||
value: "feat"
|
||||
- name: "Fix"
|
||||
description: "a bug fix"
|
||||
value: "fix"
|
||||
- name: "Documentation"
|
||||
description: "Documentation only changes"
|
||||
value: "docs"
|
||||
- name: "Styles"
|
||||
description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"
|
||||
value: "style"
|
||||
- name: "Code Refactoring"
|
||||
description: "A code change that neither fixes a bug nor adds a feature"
|
||||
value: "refactor"
|
||||
- name: "Performance Improvements"
|
||||
description: "A code change that improves performance"
|
||||
value: "perf"
|
||||
- name: "Tests"
|
||||
description: "Adding missing tests or correcting existing tests"
|
||||
value: "test"
|
||||
- name: "Builds"
|
||||
description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)"
|
||||
value: "build"
|
||||
- name: "Continuous Integration"
|
||||
description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)"
|
||||
value: "ci"
|
||||
- name: "Chores"
|
||||
description: "Other changes that don't modify src or test files"
|
||||
value: "chore"
|
||||
- name: "Reverts"
|
||||
description: "Reverts a previous commit"
|
||||
value: "revert"
|
||||
- type: "input"
|
||||
title: "Enter the scope(s) of this change."
|
||||
key: "Scopes"
|
||||
- type: "input"
|
||||
title: "Enter the short description of the change."
|
||||
key: "Description"
|
||||
- type: "confirm"
|
||||
title: "Is the commit message correct?"
|
||||
body: "{{ .Form.Type }}{{if .Form.Scopes}}({{ .Form.Scopes }}){{end}}: {{ .Form.Description }}"
|
||||
|
|
|
@ -1,41 +1,53 @@
|
|||
-- Set the leader key
|
||||
--Leader
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Appearance
|
||||
vim.opt.termguicolors = true -- Enable 24-bit colors
|
||||
vim.opt.number = true -- Show line numbers
|
||||
vim.opt.relativenumber = true -- Show relative line numbers
|
||||
vim.opt.wrap = false -- Disable line wrapping
|
||||
vim.opt.conceallevel = 2 -- Hide Org mode links (assuming you use Org mode)
|
||||
vim.opt.concealcursor = 'nc' -- Conceal text in normal mode only
|
||||
vim.opt.signcolumn = "yes" -- Always show the sign column
|
||||
vim.o.laststatus = 1 -- Always show the status line (Note: original had '1', consider '2' for always visible)
|
||||
vim.o.winborder = nil -- Use default border for floating windows
|
||||
|
||||
-- Indentation
|
||||
vim.opt.tabstop = 4 -- Number of spaces a tab represents
|
||||
vim.opt.softtabstop = 4 -- Number of spaces a <Tab> in Insert mode equals
|
||||
vim.opt.shiftwidth = 4 -- Number of spaces to use for autoindent
|
||||
vim.opt.expandtab = true -- Use spaces instead of tabs
|
||||
vim.opt.smartindent = true -- Smart auto-indenting
|
||||
|
||||
-- Searching
|
||||
vim.opt.hlsearch = false -- Disable highlighting of search matches
|
||||
vim.opt.incsearch = true -- Show partial matches while typing
|
||||
|
||||
-- Behavior and Navigation
|
||||
vim.opt.iskeyword:append("_") -- Add '_' to the list of keyword characters
|
||||
vim.opt.scrolloff = 10 -- Keep 10 lines above/below cursor when scrolling
|
||||
vim.opt.sidescrolloff = 10
|
||||
vim.opt.smoothscroll = true
|
||||
|
||||
-- File Management
|
||||
vim.opt.undodir = os.getenv("XDG_STATE_HOME") .. "/nvim/undodir" -- Directory for undo files
|
||||
vim.opt.undofile = true -- Save undo history
|
||||
vim.opt.backup = true -- Create backup files
|
||||
vim.opt.backupdir = os.getenv("XDG_STATE_HOME") .. "/nvim/backupdir" -- Directory for backup files
|
||||
vim.opt.autoread = true -- Automatically reload changed files
|
||||
vim.opt.swapfile = false -- Disable swap files
|
||||
|
||||
-- Formatting
|
||||
vim.opt.formatoptions:remove("ro") -- Remove 'ro' from formatoptions (assuming you don't want auto-wrapping comments)
|
||||
--termguicolors
|
||||
vim.opt.termguicolors = true
|
||||
--Relative line numbers
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
--Remove search highlight
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.smartindent = true
|
||||
-- Make searches case insensitive (except when using uppercase)
|
||||
vim.opt.smartcase = true
|
||||
--Change word definition
|
||||
vim.opt.iskeyword:append("_")
|
||||
--Remove Wrap
|
||||
vim.opt.wrap = false
|
||||
--Not let cursor go bellow 10 chars.
|
||||
vim.opt.scrolloff = 10
|
||||
--4 space indent
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
--Undo dir
|
||||
vim.opt.undodir = os.getenv("XDG_STATE_HOME") .. "/nvim/undodir"
|
||||
vim.opt.undofile = true
|
||||
--Backup dir
|
||||
vim.opt.backup = true
|
||||
vim.opt.backupdir = os.getenv("XDG_STATE_HOME") .. "/nvim/backupdir"
|
||||
--Org mode hide links
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.concealcursor = 'nc'
|
||||
--Jupyter notebooks
|
||||
vim.g.jukit_convert_overwrite_default = 1
|
||||
vim.g.jukit_convert_open_default = 0
|
||||
vim.g.jukit_shell_cmd = 'ipython3'
|
||||
vim.g.jukit_terminal = 'nvimterm'
|
||||
vim.g.jukit_show_prompt = 1
|
||||
vim.g.jukit_pdf_viewer = 'zathura'
|
||||
vim.g.jukit_mappings = 0
|
||||
--Format Options
|
||||
vim.opt.formatoptions:remove("ro")
|
||||
--Sign gutter always on
|
||||
vim.opt.signcolumn = "yes"
|
||||
-- sync buffers automatically
|
||||
vim.opt.autoread = true
|
||||
-- disable swapfile
|
||||
vim.opt.swapfile = false
|
||||
-- disable statusline
|
||||
vim.o.laststatus = 1
|
||||
-- border on floating windows
|
||||
vim.o.winborder = nil
|
||||
|
|
|
@ -8,6 +8,18 @@ return {
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'nvim-java/nvim-java',
|
||||
ft = "java",
|
||||
config = function()
|
||||
require('java').setup()
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities(nil, true)
|
||||
lspconfig["jdtls"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"smjonas/inc-rename.nvim",
|
||||
opts = {
|
||||
|
@ -19,28 +31,6 @@ return {
|
|||
event = "VeryLazy",
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
"ray-x/go.nvim",
|
||||
dependencies = {
|
||||
"ray-x/guihua.lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
config = function(lp, opts)
|
||||
require("go").setup(opts)
|
||||
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
require('go.format').goimports()
|
||||
end,
|
||||
group = format_sync_grp,
|
||||
})
|
||||
end,
|
||||
event = { "CmdlineEnter" },
|
||||
ft = { "go", 'gomod' },
|
||||
build = ':lua require("go.install").update_all_sync()'
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
|
@ -60,7 +50,7 @@ return {
|
|||
local conform = require("conform")
|
||||
|
||||
local function jumpWithVirtLineDiags(jumpCount)
|
||||
pcall(vim.api.nvim_del_augroup_by_name, "jumpWithVirtLineDiags")
|
||||
pcall(vim.api.nvim_del_augroup_by_name, "jumpWithVirtLineDiags") -- prevent autocmd for repeated jumps
|
||||
|
||||
vim.diagnostic.jump { count = jumpCount }
|
||||
|
||||
|
@ -70,7 +60,7 @@ return {
|
|||
virtual_lines = { current_line = true },
|
||||
}
|
||||
|
||||
vim.defer_fn(function()
|
||||
vim.defer_fn(function() -- deferred to not trigger by jump itself
|
||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||
desc = "User(once): Reset diagnostics virtual lines",
|
||||
once = true,
|
||||
|
|
|
@ -42,9 +42,38 @@ return {
|
|||
vim.o.foldcolumn = '0'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
require('ufo').setup()
|
||||
require('ufo').setup({
|
||||
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (' %d '):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, 'MoreMsg' })
|
||||
return newVirtText
|
||||
end
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
|
@ -61,9 +90,4 @@ return {
|
|||
require 'colorizer'.setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.diff",
|
||||
opts = {}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
15
.gitconfig
15
.gitconfig
|
@ -9,7 +9,7 @@
|
|||
smudge = git-lfs smudge -- %f
|
||||
[core]
|
||||
autocrlf = input
|
||||
pager = delta --features git
|
||||
pager = delta
|
||||
excludesFile = ~/.gitignore
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
@ -33,16 +33,3 @@
|
|||
count-lines = "! git log --author=\"$1\" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\\n\", add, subs, loc }' #"
|
||||
[gpg "ssh"]
|
||||
allowedSignersFile = ~/.ssh/allowed_signers
|
||||
[delta]
|
||||
dark = true
|
||||
line-numbers = true
|
||||
hyperlinks = true
|
||||
hyperlinks-file-link-format = "lazygit-edit://{path}:{line}"
|
||||
true-color = always
|
||||
[delta "git"]
|
||||
pager = less
|
||||
paging = always
|
||||
[delta "lazygit"]
|
||||
features = diff-so-fancy
|
||||
hunk-header-style = omit
|
||||
paging = never
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue