Compare commits

...

11 Commits

Author SHA1 Message Date
don philipe
f6bbc705f8 Add latex to treesitter config 2025-09-23 23:14:08 +02:00
don philipe
30d3a8c29a Merge neovim settings 2025-09-04 09:20:03 +02:00
don philipe
a414890f69 Fix coloring in nvim in tmux remote sessions 2025-09-04 04:53:16 +02:00
don philipe
2df66474db Merge zsh functions 2025-09-04 04:51:08 +02:00
don philipe
3e30bb71a0 Add zsh function to list all git blobs in a repo 2025-09-02 13:23:45 +02:00
don philipe
177716cdbe Find dotfiles when they are not gitignored 2025-09-01 13:09:47 +02:00
don philipe
f8cf65bda9 Add doxx for docx file preview in ranger 2025-08-19 10:27:11 +02:00
don philipe
bea47efec4 Keymap for resetting hunk 2025-08-18 09:47:29 +02:00
don philipe
10de9c300b Add diffview nvim plugin 2025-08-14 10:39:43 +02:00
don philipe
5feff36b73 Add redmine plugin to nvim 2025-06-17 10:53:54 +02:00
don philipe
8f50d2cb75 Add TypeScript LSP 2025-06-17 10:52:04 +02:00
12 changed files with 61 additions and 8 deletions

View File

@@ -20,6 +20,8 @@ require("config.gitsigns")
require("config.lualine")
require("config.telescope")
require("config.indentline")
require("config.redmine")
require("config.diffview")
-- for some reason this must be placed in init.lua file
-- it doesn't work in any lua/config/*.lua files

View File

@@ -0,0 +1,2 @@
require("diffview").setup({
})

View File

@@ -2,6 +2,7 @@ require('gitsigns').setup()
local gitsigns = require('gitsigns')
vim.keymap.set('n', '<leader>gm', gitsigns.blame_line, { desc = 'Show git message for current line' })
vim.keymap.set('n', '<leader>gd', ':Gitsigns diffthis ~ vertical=true<CR>:wincmd w<CR>', { desc = 'Show diff for current line' })
vim.keymap.set('n', '<leader>gr', gitsigns.reset_hunk, { desc = 'Reset current hunk' })
vim.keymap.set('n', '<leader>h', gitsigns.next_hunk, { desc = 'Move to next hunk' })
vim.keymap.set('n', '<leader>H', gitsigns.prev_hunk, { desc = 'Move to previous hunk' })
vim.keymap.set('n', '<leader>ph', gitsigns.preview_hunk, { desc = 'Preview hunk in popup' })

View File

@@ -11,6 +11,8 @@ lspconfig_defaults.capabilities = vim.tbl_deep_extend(
require('cmp_nvim_lsp').default_capabilities()
)
require'lspconfig'.ts_ls.setup{}
-- This is where you enable features that only work
-- if there is a language server active in the file
vim.api.nvim_create_autocmd('LspAttach', {

View File

@@ -10,3 +10,9 @@ vim.opt.scrolloff = 8
vim.opt.incsearch = true
vim.opt.signcolumn = "yes"
vim.o.termguicolors = true
vim.diagnostic.config({
virtual_text = true,
})

View File

@@ -17,11 +17,16 @@ table.insert(vimgrep_arguments, "--glob")
table.insert(vimgrep_arguments, "!**/.git/*")
require('telescope').setup({
defaults = {
vimgrep_arguments = vimgrep_arguments,
layout_strategy = 'vertical',
layout_config = {
vertical = { width = 0.95 }
defaults = {
vimgrep_arguments = vimgrep_arguments,
layout_strategy = 'vertical',
layout_config = {
vertical = { width = 0.95 }
},
},
pickers = {
find_files = {
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
},
},
},
})

View File

@@ -1,6 +1,6 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline", "python", "javascript", "css", "html", "yaml", "java", "bash", "csv", "dockerfile", "htmldjango", "json", "nginx" },
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline", "python", "javascript", "css", "html", "yaml", "java", "bash", "csv", "dockerfile", "htmldjango", "json", "nginx", "latex" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,

View File

@@ -0,0 +1,3 @@
return {
"sindrets/diffview.nvim"
}

View File

@@ -0,0 +1,6 @@
return {
"sgross-emlix/angerona.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
}

View File

@@ -87,6 +87,12 @@ handle_extension() {
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## DOCX
docx)
## Uses: https://github.com/bgreenwell/doxx
doxx "${FILE_PATH}" && exit 5
exit 1;;
## XLSX
xlsx)
## Preview as csv conversion

View File

@@ -7,7 +7,7 @@ set-window-option -g window-style bg="#32302f"
set-option -g focus-events on
# https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",$TERM:RGB"
set -ag terminal-overrides ",xterm-256color:RGB"
# List of plugins

View File

@@ -59,6 +59,26 @@ m4a2mp3()
done
}
# Show all blob objects in repo sorted from smalles to largest
# https://stackoverflow.com/a/42544963
git-blobs()
{
git rev-list --objects --all --missing=print |
git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' |
sed -n 's/^blob //p' |
sort --numeric-sort --key=2 |
cut -c 1-12,41- |
$(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
}
sshs()
{
tmprc=$(ssh $1 "mktemp --directory")
scp -q $HOME/.zshrc $1:$tmprc
ssh -t $1 "export ZDOTDIR=${tmprc}; exec zsh"
ssh $1 "rm -rf ${tmprc}"
}
# show the current mode:
#PR_VIMODE="#"
#function zle-keymap-select