mirror of
https://github.com/don-philipe/dotfiles.git
synced 2025-11-08 22:57:03 +01:00
Compare commits
72 Commits
3391f92297
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6bbc705f8 | ||
|
|
30d3a8c29a | ||
|
|
a414890f69 | ||
|
|
2df66474db | ||
|
|
3e30bb71a0 | ||
|
|
177716cdbe | ||
|
|
f8cf65bda9 | ||
|
|
bea47efec4 | ||
|
|
10de9c300b | ||
|
|
5feff36b73 | ||
|
|
8f50d2cb75 | ||
|
|
b62f1697a2 | ||
|
|
4260c7876c | ||
|
|
ff7deb9cee | ||
|
|
f84673ed16 | ||
|
|
5bdd07c204 | ||
|
|
469435454e | ||
|
|
3e51152da9 | ||
|
|
6a710bac5f | ||
|
|
af50ddd8ea | ||
|
|
7128760315 | ||
|
|
f078314b0d | ||
|
|
9803f705e4 | ||
|
|
b3d8e46003 | ||
|
|
cfafeb5c04 | ||
|
|
33f864dea8 | ||
|
|
7b473872b4 | ||
|
|
6934c87709 | ||
|
|
6f4a75353f | ||
|
|
ec3b6b27b7 | ||
|
|
5f1950d6ff | ||
|
|
2d49086536 | ||
|
|
6f0dc2af55 | ||
|
|
be00da9268 | ||
|
|
c9e3b33958 | ||
|
|
550afd3996 | ||
|
|
d085ff6fe5 | ||
|
|
98d048721e | ||
|
|
afd41cae41 | ||
|
|
6189d2e969 | ||
|
|
01ce55d107 | ||
|
|
5d692852f6 | ||
|
|
f303f1aa1d | ||
|
|
5db8c17379 | ||
|
|
62e72cafe3 | ||
|
|
6cf7031cfe | ||
|
|
055641bf17 | ||
|
|
ed1176993c | ||
|
|
82adeef8a9 | ||
|
|
355f0a37f8 | ||
|
|
34f74ac6b1 | ||
|
|
3fc90c18b4 | ||
|
|
baf94304cc | ||
|
|
62f7b5085b | ||
|
|
c7322292da | ||
|
|
ecd9bff023 | ||
|
|
e0fc663f66 | ||
|
|
9b85ec30f0 | ||
|
|
6949679bf3 | ||
|
|
17b452a793 | ||
|
|
9d80e6b5a1 | ||
|
|
80202b3467 | ||
|
|
a5532feaf0 | ||
|
|
d6fee1b66e | ||
|
|
939694fefc | ||
|
|
be8ff054ee | ||
|
|
57e60ab19b | ||
|
|
6a60f14283 | ||
|
|
acc47eddc8 | ||
|
|
4405d5316f | ||
|
|
7229453192 | ||
|
|
5b594bcbc4 |
21
.config/alacritty/alacritty.toml
Normal file
21
.config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
[colors.cursor]
|
||||
cursor = "#00ff00"
|
||||
text = "#000000"
|
||||
|
||||
[env]
|
||||
# set this to have true color when using nvim etc. in remote tmux session
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[font]
|
||||
size = 9
|
||||
|
||||
[font.normal]
|
||||
family = "Jet Brains Mono Nerd Font"
|
||||
#family = "Mononoki Nerd Font"
|
||||
|
||||
[general]
|
||||
# https://github.com/alacritty/alacritty-theme
|
||||
import = ["~/.config/alacritty/themes/themes/gruvbox_dark.toml"]
|
||||
|
||||
[terminal]
|
||||
shell = "/bin/zsh"
|
||||
38
.config/nvim/init.lua
Normal file
38
.config/nvim/init.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
require("config.remap")
|
||||
require("config.set")
|
||||
require("config.commands")
|
||||
-- env vars used only for neovim
|
||||
require("config.env")
|
||||
-- configurations for various filetypes
|
||||
require("config.filetypes")
|
||||
|
||||
-- plugin manager
|
||||
require("config.lazy")
|
||||
|
||||
-- plugins
|
||||
require("config.cmp")
|
||||
require("config.gen-private")
|
||||
require("config.lsp")
|
||||
require("config.mason")
|
||||
require("config.treesitter")
|
||||
require("config.treesitter-context")
|
||||
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
|
||||
require('lspconfig').pylsp.setup {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
maxLineLength = 120,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
32
.config/nvim/lua/config/cmp.lua
Normal file
32
.config/nvim/lua/config/cmp.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- autocompletion
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Navigate between completion items
|
||||
['<C-p>'] = cmp.mapping.select_prev_item({behavior = 'select'}),
|
||||
['<C-n>'] = cmp.mapping.select_next_item({behavior = 'select'}),
|
||||
|
||||
-- `Enter` key to confirm completion
|
||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||
|
||||
-- Ctrl+Space to trigger completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
|
||||
-- Scroll up and down in the completion documentation
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
}),
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
-- switch on rounded borders in floating completion windows
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
})
|
||||
3
.config/nvim/lua/config/commands.lua
Normal file
3
.config/nvim/lua/config/commands.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
vim.api.nvim_create_user_command('JQ', function()
|
||||
vim.cmd('%!jq .')
|
||||
end, {})
|
||||
2
.config/nvim/lua/config/diffview.lua
Normal file
2
.config/nvim/lua/config/diffview.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
require("diffview").setup({
|
||||
})
|
||||
1
.config/nvim/lua/config/env.lua
Normal file
1
.config/nvim/lua/config/env.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.env.LLM_KEY = "None"
|
||||
23
.config/nvim/lua/config/filetypes.lua
Normal file
23
.config/nvim/lua/config/filetypes.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
vim.api.nvim_create_autocmd('Filetype', {
|
||||
pattern = {
|
||||
'xml',
|
||||
'html',
|
||||
'xhtml',
|
||||
'css',
|
||||
'scss',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'lua',
|
||||
'jsx',
|
||||
'tsx',
|
||||
'typescriptreact',
|
||||
'javascriptreact',
|
||||
'htmldjango'
|
||||
},
|
||||
command = 'setlocal shiftwidth=4 tabstop=4 expandtab'
|
||||
})
|
||||
vim.api.nvim_create_autocmd('Filetype', {
|
||||
pattern = { 'yaml',
|
||||
},
|
||||
command = 'setlocal shiftwidth=2 tabstop=2 expandtab'
|
||||
})
|
||||
5
.config/nvim/lua/config/gen-private.lua
Normal file
5
.config/nvim/lua/config/gen-private.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
model = "llama3.2",
|
||||
host = "foo",
|
||||
port = "11343",
|
||||
}
|
||||
8
.config/nvim/lua/config/gitsigns.lua
Normal file
8
.config/nvim/lua/config/gitsigns.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
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' })
|
||||
3
.config/nvim/lua/config/indentline.lua
Normal file
3
.config/nvim/lua/config/indentline.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
require'indentmini'.setup()
|
||||
vim.cmd.highlight('IndentLine guifg=#444444')
|
||||
vim.cmd.highlight('IndentLineCurrent guifg=#557755')
|
||||
41
.config/nvim/lua/config/lazy.lua
Normal file
41
.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
},
|
||||
true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
ui = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
|
||||
-- Open lazy menu with :Lazy check
|
||||
34
.config/nvim/lua/config/lsp.lua
Normal file
34
.config/nvim/lua/config/lsp.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Reserve a space in the gutter
|
||||
-- This will avoid an annoying layout shift in the screen
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Add cmp_nvim_lsp capabilities settings to lspconfig
|
||||
-- This should be executed before you configure any language server
|
||||
local lspconfig_defaults = require('lspconfig').util.default_config
|
||||
lspconfig_defaults.capabilities = vim.tbl_deep_extend(
|
||||
'force',
|
||||
lspconfig_defaults.capabilities,
|
||||
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', {
|
||||
desc = 'LSP actions',
|
||||
callback = function(event)
|
||||
local opts = {buffer = event.buf}
|
||||
|
||||
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
||||
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
||||
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
||||
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
||||
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||
end,
|
||||
})
|
||||
11
.config/nvim/lua/config/lualine.lua
Normal file
11
.config/nvim/lua/config/lualine.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
require('lualine').setup{
|
||||
sections = {
|
||||
lualine_c = {
|
||||
{
|
||||
'filename',
|
||||
path = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
.config/nvim/lua/config/mason.lua
Normal file
9
.config/nvim/lua/config/mason.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
handlers = {
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup({})
|
||||
end,
|
||||
},
|
||||
})
|
||||
-- install language servers via :LspInstall
|
||||
25
.config/nvim/lua/config/remap.lua
Normal file
25
.config/nvim/lua/config/remap.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
-- Custom remappings
|
||||
|
||||
-- paste buffer and dont replace buffer content with what has been pasted over (but put it to "void" buffer)
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP")
|
||||
|
||||
-- tab creation, navigation and closing
|
||||
vim.keymap.set("n", "<C-t>", ":tabnew<CR>")
|
||||
vim.keymap.set("n", "<C-h>", ":tabprevious<CR>")
|
||||
vim.keymap.set("n", "<C-l>", ":tabnext<CR>")
|
||||
vim.keymap.set("n", "<C-x>", ":tabclose<CR>")
|
||||
|
||||
-- resize windows with arrow keys
|
||||
vim.keymap.set("n", "<Up>", ":resize -1<CR>")
|
||||
vim.keymap.set("n", "<Down>", ":resize +1<CR>")
|
||||
vim.keymap.set("n", "<Left>", ":vertical resize -1<CR>")
|
||||
vim.keymap.set("n", "<Right>", ":vertical resize +1<CR>")
|
||||
|
||||
-- prompt user for command, run it and put it's output at cursor position
|
||||
local function run_and_paste()
|
||||
local out_raw = vim.fn.system(vim.fn.input('Command: '))
|
||||
local out = string.gsub(out_raw, "\n", "")
|
||||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
vim.api.nvim_buf_set_text(0, row - 1, col, row - 1, col, { out })
|
||||
end
|
||||
vim.keymap.set("n", "<C-c>", run_and_paste)
|
||||
18
.config/nvim/lua/config/set.lua
Normal file
18
.config/nvim/lua/config/set.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Custom settings
|
||||
|
||||
vim.opt.guicursor = ""
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
vim.o.termguicolors = true
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
})
|
||||
32
.config/nvim/lua/config/telescope.lua
Normal file
32
.config/nvim/lua/config/telescope.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
vim.keymap.set('n', '<leader>ft', builtin.treesitter, { desc = 'Telescope treesitter picker' })
|
||||
-- find selected text in visual mode with Ctrl-f via telescope:
|
||||
vim.keymap.set('v', '<C-f>', 'y<ESC>:Telescope live_grep default_text=<C-r>0<CR>', default_opts)
|
||||
|
||||
-- grep hidden files as well
|
||||
local telescopeConfig = require("telescope.config")
|
||||
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
|
||||
-- I want to search in hidden/dot files.
|
||||
table.insert(vimgrep_arguments, "--hidden")
|
||||
-- I don't want to search in the `.git` directory.
|
||||
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 }
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
||||
},
|
||||
},
|
||||
})
|
||||
3
.config/nvim/lua/config/treesitter-context.lua
Normal file
3
.config/nvim/lua/config/treesitter-context.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
require'treesitter-context'.setup{
|
||||
enable = true,
|
||||
}
|
||||
42
.config/nvim/lua/config/treesitter.lua
Normal file
42
.config/nvim/lua/config/treesitter.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
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", "latex" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
--ignore_install = { "javascript" },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
--disable = { "c", "rust" },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
--disable = function(lang, buf)
|
||||
-- local max_filesize = 100 * 1024 -- 100 KB
|
||||
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
-- if ok and stats and stats.size > max_filesize then
|
||||
-- return true
|
||||
-- end
|
||||
--end,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
-- indent with treesitter is currently experimental, just mark text and hit "="
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
3
.config/nvim/lua/plugins/cmp.lua
Normal file
3
.config/nvim/lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{'neovim/nvim-cmp'}
|
||||
}
|
||||
3
.config/nvim/lua/plugins/diffview.lua
Normal file
3
.config/nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"sindrets/diffview.nvim"
|
||||
}
|
||||
26
.config/nvim/lua/plugins/gen.lua
Normal file
26
.config/nvim/lua/plugins/gen.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local ok, vars = pcall(require, 'config.gen-private')
|
||||
if not ok then
|
||||
print("Missing gen-private configuration file.")
|
||||
end
|
||||
|
||||
return {
|
||||
{ "David-Kunz/gen.nvim",
|
||||
opts = {
|
||||
model = vars["model"],
|
||||
host = vars["host"],
|
||||
port = vars["port"],
|
||||
https = vars["https"],
|
||||
show_prompt = true,
|
||||
debug = false,
|
||||
|
||||
-- https://github.com/David-Kunz/gen.nvim/issues/116
|
||||
command = function(options)
|
||||
local body = { model = options.model, stream = true }
|
||||
local schema = "http"
|
||||
if options.https then
|
||||
schema = "https"
|
||||
end
|
||||
return "curl --silent --no-buffer -X POST " .. schema .. "://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
|
||||
end,
|
||||
}},
|
||||
}
|
||||
3
.config/nvim/lua/plugins/gitsigns.lua
Normal file
3
.config/nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{'lewis6991/gitsigns.nvim', version='^1.0.2'}
|
||||
}
|
||||
3
.config/nvim/lua/plugins/gruvbox.lua
Normal file
3
.config/nvim/lua/plugins/gruvbox.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{'morhetz/gruvbox', config = function() vim.cmd.colorscheme("gruvbox") end }
|
||||
}
|
||||
3
.config/nvim/lua/plugins/indentline.lua
Normal file
3
.config/nvim/lua/plugins/indentline.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"nvimdev/indentmini.nvim",
|
||||
}
|
||||
5
.config/nvim/lua/plugins/lsp.lua
Normal file
5
.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{'neovim/nvim-lspconfig', tag = 'v1.7.0'}, -- pin to a version thats compatible with nvim < 0.10
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'hrsh7th/nvim-cmp'},
|
||||
}
|
||||
4
.config/nvim/lua/plugins/lualine.lua
Normal file
4
.config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||
}
|
||||
7
.config/nvim/lua/plugins/mason.lua
Normal file
7
.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- pin version due to https://github.com/mason-org/mason.nvim/issues/1929
|
||||
-- mason for downloading language servers
|
||||
{'williamboman/mason.nvim', version = "^1.0.0"},
|
||||
-- mason-lspconfig to configure auto setup of language servers
|
||||
{'williamboman/mason-lspconfig.nvim', version = "^1.0.0"},
|
||||
}
|
||||
9
.config/nvim/lua/plugins/mini.lua
Normal file
9
.config/nvim/lua/plugins/mini.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- plugins form the "mini" plugin set https://github.com/echasnovski/mini.nvim?tab=readme-ov-file#modules
|
||||
return {
|
||||
-- auto-insert closing brackets etc.
|
||||
{
|
||||
'echasnovski/mini.pairs',
|
||||
event = 'InsertEnter', -- lazy loading (when entering insert mode)
|
||||
config = true, -- shorthand for calling plugins setup function
|
||||
},
|
||||
}
|
||||
6
.config/nvim/lua/plugins/redmine.lua
Normal file
6
.config/nvim/lua/plugins/redmine.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"sgross-emlix/angerona.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
}
|
||||
8
.config/nvim/lua/plugins/telescope.lua
Normal file
8
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.8',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'BurntSushi/ripgrep', -- required for live_grep and grep_string and is the first priority for find_files
|
||||
'nvim-telescope/telescope-fzf-native.nvim', -- native telescope sorter to significantly improve sorting performance
|
||||
}
|
||||
}
|
||||
4
.config/nvim/lua/plugins/treesitter-context.lua
Normal file
4
.config/nvim/lua/plugins/treesitter-context.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
{'nvim-treesitter/nvim-treesitter-context',
|
||||
},
|
||||
}
|
||||
6
.config/nvim/lua/plugins/treesitter.lua
Normal file
6
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
{'nvim-treesitter/nvim-treesitter',
|
||||
tag = 'v0.9.3'}, -- pin to a version that works with nvim < 0.10
|
||||
-- configure parsers via config/treesitter.lua
|
||||
-- update parsers with :TSUpdate
|
||||
}
|
||||
@@ -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
|
||||
|
||||
33
.tmux.conf
Normal file
33
.tmux.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
set -g default-shell /usr/bin/zsh
|
||||
# normal background for active pane
|
||||
set-window-option -g window-active-style bg=terminal
|
||||
# grayed background for inactive panes
|
||||
set-window-option -g window-style bg="#32302f"
|
||||
# ensure "autoread" works in nvim (auto reload files when changed)
|
||||
set-option -g focus-events on
|
||||
# https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
# List of plugins
|
||||
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
|
||||
# Plugin configurations
|
||||
|
||||
# auto-restore
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
# Install plugin manager
|
||||
#git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||
# Install plugin:
|
||||
# 1. add to .tmux.conf
|
||||
# 2. prefix+I to fetch it
|
||||
# Remove plugin:
|
||||
# 1. remove from .tmux.conf
|
||||
# 2. prefix+alt+u to remove it
|
||||
# Update plugins:
|
||||
# - prefix+U
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
13
.vim/after/ftplugin/html.vim
Normal file
13
.vim/after/ftplugin/html.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
setlocal shiftwidth=4
|
||||
setlocal tabstop=4
|
||||
|
||||
" create closing xml tag when typing >
|
||||
" first write the actual closing bracket (>), then got to normal mode (<Esc>), find
|
||||
" opening bracket (F<), go one step to the right (l), yank the tag name (yiw),
|
||||
" find the closing bracket (f>), start appending opening bracket and slash (a</), paste
|
||||
" yanked word from default register (<C-r>"), add closing bracket (>), leave
|
||||
" insert mode (<Esc>), go back to opening bracket (F<), enter insert mode (i)
|
||||
inoremap > ><Esc>F<lyiwf>a</<C-r>"><Esc>F<i
|
||||
" overwrite automatic angle bracket closing from vimrc to make auto-closing
|
||||
" tags work properly
|
||||
inoremap < <
|
||||
3
.vim/ftplugin/Readme.md
Normal file
3
.vim/ftplugin/Readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Show matching html/xml tags when hovering with cursor
|
||||
|
||||
html.vim and xml.vim from https://github.com/gregsexton/MatchTag
|
||||
100
.vim/ftplugin/html.vim
Normal file
100
.vim/ftplugin/html.vim
Normal file
@@ -0,0 +1,100 @@
|
||||
" Vim plugin for showing matching html tags.
|
||||
" Maintainer: Greg Sexton <gregsexton@gmail.com>
|
||||
" Credits: Bram Moolenar and the 'matchparen' plugin from which this draws heavily.
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
augroup matchhtmlparen
|
||||
autocmd! CursorMoved,CursorMovedI,WinEnter <buffer> call s:Highlight_Matching_Pair()
|
||||
augroup END
|
||||
|
||||
fu! s:Highlight_Matching_Pair()
|
||||
" Remove any previous match.
|
||||
if exists('w:tag_hl_on') && w:tag_hl_on
|
||||
2match none
|
||||
let w:tag_hl_on = 0
|
||||
endif
|
||||
|
||||
" Avoid that we remove the popup menu.
|
||||
" Return when there are no colors (looks like the cursor jumps).
|
||||
if pumvisible() || (&t_Co < 8 && !has("gui_running"))
|
||||
return
|
||||
endif
|
||||
|
||||
"get html tag under cursor
|
||||
let tagname = s:GetCurrentCursorTag()
|
||||
if tagname == ""|return|endif
|
||||
|
||||
if tagname[0] == '/'
|
||||
let position = s:SearchForMatchingTag(tagname[1:], 0)
|
||||
else
|
||||
let position = s:SearchForMatchingTag(tagname, 1)
|
||||
endif
|
||||
call s:HighlightTagAtPosition(position)
|
||||
endfu
|
||||
|
||||
fu! s:GetCurrentCursorTag()
|
||||
"returns the tag under the cursor, includes the '/' if on a closing tag.
|
||||
|
||||
let c_col = col('.')
|
||||
let matched = matchstr(getline('.'), '\(<[^<>]*\%'.c_col.'c.\{-}>\)\|\(\%'.c_col.'c<.\{-}>\)')
|
||||
if matched =~ '/>$'
|
||||
return ""
|
||||
elseif matched == ""
|
||||
" The tag itself may be spread over multiple lines.
|
||||
let matched = matchstr(getline('.'), '\(<[^<>]*\%'.c_col.'c.\{-}$\)\|\(\%'.c_col.'c<.\{-}$\)')
|
||||
if matched == ""
|
||||
return ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" XML Tag definition is
|
||||
" (Letter | '_' | ':') (Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender)*
|
||||
" Instead of dealing with CombiningChar and Extender, and because Vim's
|
||||
" [:alpha:] only includes 8-bit characters, let's include all non-ASCII
|
||||
" characters.
|
||||
let tagname = matchstr(matched, '<\zs/\?\%([[:alpha:]_:]\|[^\x00-\x7F]\)\%([-._:[:alnum:]]\|[^\x00-\x7F]\)*')
|
||||
return tagname
|
||||
endfu
|
||||
|
||||
fu! s:SearchForMatchingTag(tagname, forwards)
|
||||
"returns the position of a matching tag or [0 0]
|
||||
|
||||
let starttag = '\V<'.escape(a:tagname, '\').'\%(\_s\%(\.\{-}\|\_.\{-}\%<'.line('.').'l\)/\@<!\)\?>'
|
||||
let midtag = ''
|
||||
let endtag = '\V</'.escape(a:tagname, '\').'\_s\*'.(a:forwards?'':'\zs').'>'
|
||||
let flags = 'nW'.(a:forwards?'':'b')
|
||||
|
||||
" When not in a string or comment ignore matches inside them.
|
||||
let skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
|
||||
\ '=~? "\\%(html\\|xml\\)String\\|\\%(html\\|xml\\)CommentPart"'
|
||||
if skip | let skip = 0 | endif
|
||||
|
||||
" Limit the search to lines visible in the window.
|
||||
let stopline = a:forwards ? line('w$') : line('w0')
|
||||
let timeout = 300
|
||||
|
||||
" The searchpairpos() timeout parameter was added in 7.2
|
||||
if v:version >= 702
|
||||
return searchpairpos(starttag, midtag, endtag, flags, skip, stopline, timeout)
|
||||
else
|
||||
return searchpairpos(starttag, midtag, endtag, flags, skip, stopline)
|
||||
endif
|
||||
endfu
|
||||
|
||||
fu! s:HighlightTagAtPosition(position)
|
||||
if a:position == [0, 0]
|
||||
return
|
||||
endif
|
||||
|
||||
let [m_lnum, m_col] = a:position
|
||||
exe '2match MatchParen /\(\%' . m_lnum . 'l\%' . m_col . 'c<\zs.\{-}\ze[\n >]\)\|'
|
||||
\ .'\(\%' . line('.') . 'l\%' . col('.') . 'c<\zs.\{-}\ze[\n >]\)\|'
|
||||
\ .'\(\%' . line('.') . 'l<\zs[^<> ]*\%' . col('.') . 'c.\{-}\ze[\n >]\)\|'
|
||||
\ .'\(\%' . line('.') . 'l<\zs[^<>]\{-}\ze\s[^<>]*\%' . col('.') . 'c.\{-}[\n>]\)/'
|
||||
let w:tag_hl_on = 1
|
||||
endfu
|
||||
|
||||
" vim: set ts=8 sts=4 sw=4 expandtab :
|
||||
2
.vim/ftplugin/xml.vim
Normal file
2
.vim/ftplugin/xml.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
runtime! ftplugin/html.vim
|
||||
|
||||
74
.vimrc
74
.vimrc
@@ -1,5 +1,6 @@
|
||||
" general configuration:
|
||||
syntax on " Turn on colors filetype plugin on " Enables the ftplugin options filetype indent on
|
||||
syntax on
|
||||
filetype plugin on " Enables the ftplugin options filetype indent on
|
||||
set nocompatible " turn off vi-compatibility (should be on by default)
|
||||
set autoindent " Automaticaly indent while writing
|
||||
set smarttab
|
||||
@@ -11,6 +12,10 @@ set showcmd
|
||||
set scrolloff=8
|
||||
set enc=utf-8
|
||||
set wrapscan " start searching at the beginning when EOF reached
|
||||
set matchpairs+=<:> " add angle brackets to list of matching bracket pairs
|
||||
set wildmenu " show all matching files when tab completing
|
||||
set updatetime=1000 " updates vim TUI every second (especially gitgutter signs), affects swap write rate as well
|
||||
set relativenumber " turn on relative line numbering
|
||||
|
||||
" simple appending closing characters automatically
|
||||
inoremap { {}<Left>
|
||||
@@ -34,9 +39,11 @@ inoremap <expr>> strpart(getline('.'), col('.')-1, 1) == ">" ? "\<Right>" : ">"
|
||||
"inoremap ' ''<Left>
|
||||
|
||||
" Tab navigation
|
||||
nmap <C-t> :tabnew<CR>
|
||||
" new tab and move to previous window (NERDTree if open)
|
||||
nmap <C-t> :tabnew <bar> :wincmd h<CR>
|
||||
nmap <C-h> :tabprev<CR>
|
||||
nmap <C-l> :tabnext<CR>
|
||||
nmap <C-x> :tabclose<CR>
|
||||
|
||||
" Resize windows with arrow keys
|
||||
nmap <Up> :res -1<CR>
|
||||
@@ -60,6 +67,14 @@ if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
" Open the existing NERDTree on each new tab
|
||||
autocmd BufWinEnter * if &buftype != 'quickfix' && getcmdwintype() == '' | silent NERDTreeMirror | endif
|
||||
|
||||
" Shortcut for JSON formatting via jq
|
||||
if executable('jq')
|
||||
command JQ %!jq .
|
||||
endif
|
||||
|
||||
" Plugin config section. Plugins will be installed under ~/.vim/plugged/
|
||||
call plug#begin()
|
||||
|
||||
@@ -69,8 +84,8 @@ Plug 'pearofducks/ansible-vim'
|
||||
" NERDtree
|
||||
Plug 'preservim/nerdtree'
|
||||
|
||||
" One NERDtree for all tabs
|
||||
Plug 'jistr/vim-nerdtree-tabs'
|
||||
" Git plugin for NERDtree
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
" Statusline
|
||||
Plug 'vim-airline/vim-airline'
|
||||
@@ -108,11 +123,28 @@ Plug 'vim-autoformat/vim-autoformat'
|
||||
" Comment stuff out: one line with `gcc`, selection with `gc`
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
" Show python coverage, needs coverage.py installed (globally)
|
||||
" use with `:Coveragepy report` or `:Coveragepy show`
|
||||
Plug 'alfredodeza/coveragepy.vim'
|
||||
|
||||
" Gruvbox color scheme
|
||||
Plug 'morhetz/gruvbox'
|
||||
|
||||
" Ripgrep plugin for recursive search
|
||||
" use `:Rg <pattern>` to search in current directory
|
||||
Plug 'jremmen/vim-ripgrep'
|
||||
|
||||
" Multi language linting tool
|
||||
" - https://github.com/koalaman/shellcheck install through package manager
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
Plug 'chrisbra/csv.vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
" ,nn will toggle NERDTree on and off
|
||||
"nmap <LocalLeader>n :NERDTreeToggle<cr>
|
||||
" Set alias command for toggeling nerd tree
|
||||
command NT NERDTree
|
||||
|
||||
" special configuration:
|
||||
|
||||
@@ -123,16 +155,38 @@ call plug#end()
|
||||
let g:pymode_options_max_line_length = 120
|
||||
"let g:pydiction_location = '~/.vim/pydiction-1.2/complete-dict'
|
||||
|
||||
" Gruvbox color scheme
|
||||
" ====================
|
||||
"
|
||||
set background=dark
|
||||
colorscheme gruvbox
|
||||
|
||||
" vim-ripgrep
|
||||
" ===========
|
||||
"
|
||||
let g:rg_highlight = 1
|
||||
|
||||
" vim-gitgutter
|
||||
" =============
|
||||
"
|
||||
let g:gitgutter_sign_added = '▇▇'
|
||||
let g:gitgutter_sign_modified = '▇▇'
|
||||
let g:gitgutter_sign_removed = '▇▇'
|
||||
highlight GitGutterAdd ctermfg = 2
|
||||
highlight GitGutterChange ctermfg = 3
|
||||
highlight GitGutterDelete ctermfg = 1
|
||||
highlight SignColumn ctermbg=0
|
||||
let g:gitgutter_sign_modified_removed = '▇▇'
|
||||
highlight GitGutterAdd ctermfg = 2 guifg=#008000
|
||||
highlight GitGutterChange ctermfg = 3 guifg=#808000
|
||||
highlight GitGutterDelete ctermfg = 1 guifg=#800000
|
||||
highlight GitGutterChangeDeleteLine ctermfg = 3 guifg=#808000
|
||||
highlight SignColumn ctermbg=0 guibg=#000000
|
||||
|
||||
" git-messenger
|
||||
" =============
|
||||
"
|
||||
" show diff of current file in message popup
|
||||
let g:git_messenger_include_diff = "current"
|
||||
" move cursor into popup
|
||||
let g:git_messenger_always_into_popup = v:true
|
||||
let g:git_messenger_max_popup_height = 30
|
||||
|
||||
" Vala
|
||||
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||
|
||||
89
.zsh-custom/functions.zsh
Normal file
89
.zsh-custom/functions.zsh
Normal file
@@ -0,0 +1,89 @@
|
||||
# start/attach tmux session
|
||||
# use function in .zshrc to attach at every login
|
||||
autotmux()
|
||||
{
|
||||
if [ -z "$TMUX" ]; then
|
||||
# get the id of a deattached session
|
||||
ID="`tmux ls | grep -vm1 attached | cut -d: -f1`"
|
||||
if [ -z "$ID" ]; then
|
||||
tmux new-session
|
||||
else
|
||||
tmux attach-session -t "$ID"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
checkpem()
|
||||
{
|
||||
openssl x509 -in "$1" -noout -text
|
||||
}
|
||||
checkcert()
|
||||
{
|
||||
openssl s_client -connect "$1":443 2>/dev/null
|
||||
}
|
||||
|
||||
# works only without tex-ending
|
||||
tex2pdf()
|
||||
{
|
||||
pdflatex "$1"
|
||||
bibtex "$1"
|
||||
pdflatex "$1"
|
||||
pdflatex "$1"
|
||||
}
|
||||
|
||||
startx()
|
||||
{
|
||||
nohup startx "$@" > /dev/null 2>&1 &
|
||||
disown
|
||||
vlock
|
||||
}
|
||||
|
||||
# generate qrcode and display it
|
||||
func_qrcode()
|
||||
{
|
||||
qrencode "$1" -o - | feh -
|
||||
}
|
||||
# Create alias calling the function with space prefix, so that it is not logged in history file. This avoids logging passwords and stuff.
|
||||
alias qrcode=" func_qrcode"
|
||||
|
||||
ogg2mp3()
|
||||
{
|
||||
for file in *ogg; do
|
||||
ffmpeg -i $file -b:a 192k -map_metadata 0:s:a:0 "${file%.*}.mp3"
|
||||
done
|
||||
}
|
||||
m4a2mp3()
|
||||
{
|
||||
for file in *m4a; do
|
||||
ffmpeg -i $file -b:a 192k -map_metadata 0:s:a:0 "${file%.*}.mp3"
|
||||
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
|
||||
#{
|
||||
# PR_VIMODE="${${KEYMAP/vicmd/¢}/(main|viins)/$}"
|
||||
# zle reset-prompt
|
||||
#}
|
||||
#zle -N zle-keymap-select
|
||||
8
.zsh-custom/themes/don.zsh-theme
Normal file
8
.zsh-custom/themes/don.zsh-theme
Normal file
@@ -0,0 +1,8 @@
|
||||
# Load version control information
|
||||
autoload -Uz vcs_info
|
||||
# Show branch information in brackets
|
||||
zstyle ':vcs_info:git:*' formats '(%b)'
|
||||
precmd() { vcs_info }
|
||||
|
||||
PROMPT="%B[%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}%~]>> "
|
||||
RPROMPT="%F{yellow}\$vcs_info_msg_0_%f"
|
||||
119
.zshrc
Normal file
119
.zshrc
Normal file
@@ -0,0 +1,119 @@
|
||||
# Path to your oh-my-zsh installation.
|
||||
ZSH=/usr/share/oh-my-zsh/
|
||||
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
ZSH_THEME="don"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion.
|
||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to automatically update without prompting.
|
||||
# DISABLE_UPDATE_PROMPT="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
HIST_STAMPS="yyyy-mm-dd"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
ZSH_CUSTOM=$HOME/.zsh-custom
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
plugins=(git)
|
||||
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
|
||||
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
|
||||
if [[ ! -d $ZSH_CACHE_DIR ]]; then
|
||||
mkdir $ZSH_CACHE_DIR
|
||||
fi
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
setopt appendhistory autocd extendedglob
|
||||
setopt GLOB_COMPLETE
|
||||
setopt HIST_IGNORE_SPACE # ignore command lines when first character is a space
|
||||
unsetopt beep
|
||||
|
||||
### Enter Vim-Mode ###
|
||||
bindkey -v
|
||||
|
||||
### enable incr. search with Strg-r ###
|
||||
bindkey -M viins '^r' history-incremental-pattern-search-backward
|
||||
bindkey -M vicmd '^r' history-incremental-pattern-search-backward
|
||||
bindkey "^[[A" history-beginning-search-backward
|
||||
bindkey "^[[B" history-beginning-search-forward
|
||||
|
||||
# End of lines configured by zsh-newuser-install
|
||||
# The following lines were added by compinstall
|
||||
zstyle :compinstall filename '$HOME/.zshrc'
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
# colors for the custom prompt:
|
||||
autoload -U colors && colors
|
||||
# for predefined prompts:
|
||||
autoload -U promptinit
|
||||
promptinit
|
||||
|
||||
export XDG_CONFIG_HOME=$HOME/.config/
|
||||
export EDITOR=vim
|
||||
|
||||
alias ls='ls --color=always'
|
||||
alias grep='grep --color=always'
|
||||
alias less='less -R'
|
||||
alias dd='dd status=progress oflag=direct'
|
||||
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
alias hibernate='sudo systemctl hibernate'
|
||||
alias ssh="TERM=linux ssh" # for not complaining urxvt about terminals without TERM set
|
||||
alias cpup="cp -T $0 ../$0"
|
||||
alias pythonweb="python -m SimpleHTTPServer 8090"
|
||||
Reference in New Issue
Block a user