remove history to make repo public.

This commit is contained in:
Dmitry Voronin 2023-08-08 16:24:15 +03:00
commit 7ec9d79e8e
254 changed files with 2929 additions and 0 deletions

8
.bash_profile Normal file
View file

@ -0,0 +1,8 @@
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs

1
.bashrc Symbolic link
View file

@ -0,0 +1 @@
document/linux/config/bash/bashrc.sh

View file

@ -0,0 +1,4 @@
file:///var/home/voronind/tmp
file:///var/mnt
ftp://192.168.1.2/ home ftp
sftp://192.168.1.2:22143/ home sftp

2
.config/gtk-3.0/gtk.css Normal file
View file

@ -0,0 +1,2 @@
@define-color accent_color #f9f06b;
@define-color accent_bg_color #f5c211;

View file

@ -0,0 +1,2 @@
[Settings]
gtk-application-prefer-dark-theme=0

2
.config/gtk-4.0/gtk.css Normal file
View file

@ -0,0 +1,2 @@
@define-color accent_color #f9f06b;
@define-color accent_bg_color #f5c211;

6
.config/gtk-4.0/servers Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xbel version="1.0"
xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
>
</xbel>

View file

@ -0,0 +1,2 @@
[Settings]
gtk-application-prefer-dark-theme=0

63
.config/htop/htoprc Normal file
View file

@ -0,0 +1,63 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.2.2
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=1
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=0
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=1
show_cpu_temperature=1
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
hide_function_bar=0
header_layout=two_50_50
column_meters_0=LeftCPUs2 Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs2 DateTime Tasks LoadAverage DiskIO NetworkIO Uptime
column_meter_modes_1=1 2 2 2 2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

24
.config/nvim/init.lua Normal file
View file

@ -0,0 +1,24 @@
require('plugin/init')
require('config/search')
require('config/tab')
require('config/etc')
require('key/leader')
require('key/filetree')
require('key/lsp')
require('key/whichkey')
require('key/navigation')
require('key/comment')
require('key/gitsigns')
require('key/trouble')
require('key/terminal')
require('key/autocomplete')
require('key/window')
require('key/telescope')
require('key/common')
require('key/todo')
require('key/align')
require('key/fold')
require('key/update')
require('key/macro')

View file

@ -0,0 +1,14 @@
-- TODO: add comments and separate files.
vim.opt.number = true
vim.opt.wildmode = 'longest,list'
-- vim.opt.completeopt = 'menuone,noselect'
vim.opt.cursorline = true
vim.opt.ttyfast = true
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.clipboard = 'unnamedplus'
vim.opt.fixeol = false
vim.opt.termguicolors = true
vim.cmd("autocmd BufEnter * set fo-=c fo-=r fo-=o")
vim.cmd("set mouse=") -- disable mouse.

View file

@ -0,0 +1,5 @@
vim.opt.ignorecase = false
vim.opt.smartcase = false
vim.opt.showmatch = true
vim.opt.hlsearch = true
vim.opt.incsearch = true

View file

@ -0,0 +1,6 @@
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
-- vim.opt.smartindent = true
vim.opt.expandtab = true
vim.opt.autoindent = true

View file

@ -0,0 +1,4 @@
require('key/rekey')
rekey_visual('<Leader>A', '<cmd>lua require("align").align_to_string(false, false, true)<cr>')
rekey_visual('<Leader>a', '<cmd>lua require("align").align_to_string(false, true, true)<cr>')

View file

@ -0,0 +1,4 @@
require('key/rekey')
rekey_input('<C-Space>', '<C-n>')
rekey_normal('<C-Space>', '<cmd>lua vim.lsp.buf.code_action()<cr>')

View file

@ -0,0 +1,2 @@
vim.keymap.set("n", "<Leader>/", require("SingleComment").SingleComment, { expr = true })
vim.keymap.set("v", "<Leader>/", require("SingleComment").Comment, {})

View file

@ -0,0 +1,10 @@
require('key/rekey')
rekey_normal('<Leader>.', '@:') -- repeat command.
rekey_normal(';', ':') -- remap ; to :.
rekey_normal('zz', '<cmd>wa<cr>') -- save file.
rekey_normal('gh', '0') -- go left.
rekey_normal('gl', '$') -- go right.
rekey_normal('gj', 'G') -- go bottom.
rekey_normal('gk', 'gg') -- go top.
rekey_normal('U', '<C-r>') -- redo.

View file

@ -0,0 +1,3 @@
require('key/rekey')
rekey_normal('<Leader>1', '<cmd>NvimTreeToggle<cr>')

View file

@ -0,0 +1,4 @@
require('key/rekey')
remap_normal('<Leader>o', 'za')
remap_normal('<Leader>O', 'zx zM')

View file

@ -0,0 +1,3 @@
require('key/rekey')
rekey_normal('<Leader>g', '<cmd>Gitsigns toggle_current_line_blame<cr><cmd>Gitsigns toggle_word_diff<cr><cmd>Gitsigns toggle_linehl<cr>')

View file

@ -0,0 +1,4 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- vim.api.nvim_set_keymap('', '<Space>', '<Nop>', { noremap = true, silent = true })
vim.cmd("set notimeout nottimeout")

View file

@ -0,0 +1 @@
require('key/rekey')

View file

@ -0,0 +1,33 @@
require("key/rekey")
-- wraps.
rekey_visual('mw"', 's""<esc>P')
rekey_visual('mw3"', 's""""""<esc>hhP')
rekey_visual('mw\'', 's\'\'<esc>P')
rekey_visual('mw(', 's()<esc>P')
rekey_visual('mw{', 's{}<esc>P')
rekey_visual('mw[', 's[]<esc>P')
rekey_visual('mw`', 's``<esc>P')
rekey_visual('mw*', 's**<esc>P')
rekey_visual('mw2*', 's****<esc>hP')
rekey_visual('mw3*', 's******<esc>hhP')
-- markdown.
rekey_visual('mmx', ':s/- \\[ \\]/- \\[x\\]<C-l>/<cr>')
rekey_visual('mm ', ':s/- \\[x\\]/- \\[ \\]<C-l>/<cr>')
rekey_normal('mmx', ':s/- \\[ \\]/- \\[x\\]<C-l>/<cr>')
rekey_normal('mm ', ':s/- \\[x\\]/- \\[ \\]<C-l>/<cr>')
rekey_visual('mmb', 's****<esc>hP')
rekey_visual('mmi', 's**<esc>P')
rekey_visual('mms', 's~~~~<esc>hP')
-- rekey_visual('mm>', ':s/^')
-- rekey_visual('mm<', '')
-- rekey_normal('mm>', '')
-- rekey_normal('mm<', '')
-- increment.
rekey_normal('mi', '<C-a>yyup<C-o>j')
-- select.
rekey_normal('ma', 'ggVG')

View file

@ -0,0 +1,35 @@
require('key/rekey')
-- switch windows.
rekey_normal('<Leader>w', '<C-w>k')
rekey_normal('<Leader>a', '<C-w>h')
rekey_normal('<Leader>s', '<C-w>j')
rekey_normal('<Leader>d', '<C-w>l')
-- switch buffers.
-- rekey_normal('<Tab>', '<cmd>bnext<cr>')
rekey_normal('<Leader>e', '<cmd>BufferLineCycleNext<cr>')
rekey_normal('<Leader>q', '<cmd>BufferLineCyclePrev<cr>')
rekey_normal('<Leader>E', '<cmd>BufferLineMoveNext<cr>')
rekey_normal('<Leader>Q', '<cmd>BufferLineMovePrev<cr>')
-- close buffer.
-- rekey_normal('<Leader>x', '<cmd>bd!<cr>')
rekey_normal('<Leader>x', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>')
-- move window.
rekey_normal('<Leader>m', '<cmd>WinShift<cr>')
-- splits.
rekey_normal('<Leader>|', '<cmd>vsplit<cr>')
rekey_normal('<Leader>-', '<cmd>split<cr>')
rekey_normal('<Leader>c', '<C-w>q')
-- close all hidden buffers.
rekey_normal('<Leader>X', '<cmd>BDelete hidden<cr><C-l>')
-- navigate hjkl in insert mode.
rekey_input('<C-h>', '<Left>')
rekey_input('<C-j>', '<Down>')
rekey_input('<C-k>', '<Up>')
rekey_input('<C-l>', '<Right>')

View file

@ -0,0 +1,39 @@
local function rekey(t, key, command)
vim.api.nvim_set_keymap(t, key, command, { noremap = true })
end
local function remap(t, key, command)
vim.api.nvim_set_keymap(t, key, command, { noremap = false })
end
function rekey_normal(key, command)
rekey('n', key, command)
end
function rekey_input(key, command)
rekey('i', key, command)
end
function rekey_visual(key, command)
rekey('v', key, command)
end
function rekey_terminal(key, command)
rekey('t', key, command)
end
function remap_normal(key, command)
remap('n', key, command)
end
function remap_input(key, command)
remap('i', key, command)
end
function remap_visual(key, command)
remap('v', key, command)
end
function remap_terminal(key, command)
remap('t', key, command)
end

View file

@ -0,0 +1,8 @@
require('key/rekey')
rekey_normal('<Leader>ff', '<cmd>lua require("telescope.builtin").find_files()<cr>')
rekey_normal('<Leader>fg', '<cmd>lua require("telescope.builtin").live_grep()<cr>')
rekey_normal('<Leader>fb', '<cmd>lua require("telescope.builtin").buffers()<cr>')
rekey_normal('<Leader>fh', '<cmd>lua require("telescope.builtin").help_tags()<cr>')
rekey_normal('<Leader>ft', '<cmd>Telescope treesitter<cr>')
rekey_normal('<Leader>fa', '<cmd>Telescope<cr>')

View file

@ -0,0 +1,4 @@
require('key/rekey')
rekey_normal('<Leader>4', '<cmd>terminal<cr>')
rekey_terminal('<Esc>', '<C-\\><C-n>')

View file

@ -0,0 +1,3 @@
require('key/rekey')
rekey_normal('<Leader>3', '<cmd>TroubleToggle todo<cr>')

View file

@ -0,0 +1,3 @@
require('key/rekey')
rekey_normal('<Leader>2', '<cmd>TroubleToggle document_diagnostics<cr>')

View file

@ -0,0 +1,4 @@
vim.api.nvim_create_user_command('Update', function (args)
vim.cmd('PackerUpdate')
vim.cmd('TSUpdate')
end, { desc = "Update everything." })

View file

@ -0,0 +1,3 @@
require('key/rekey')
rekey_normal('<Leader>0', '<cmd>WhichKey<cr>')

View file

@ -0,0 +1,5 @@
require('key/rekey')
rekey_normal('_', '4<C-w><')
rekey_normal('-', '2<C-w>-')
rekey_normal('<Leader>=', '<C-w>=')

View file

@ -0,0 +1,10 @@
require("autoclose").setup({
keys = {
["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {} },
["\""] = { escape = true, close = true, pair = "\"\"", disabled_filetypes = {} },
["{"] = { escape = true, close = true, pair = "{}", disabled_filetypes = {} },
["("] = { escape = true, close = true, pair = "()", disabled_filetypes = {} },
["<"] = { escape = true, close = true, pair = "<>", disabled_filetypes = {} },
["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {} },
},
})

View file

@ -0,0 +1,5 @@
require("bufferline").setup {
-- options = {
-- numbers = 'buffer_id'
-- }
}

View file

@ -0,0 +1,7 @@
require('close_buffers').setup({
filetype_ignore = {}, -- Filetype to ignore when running deletions
file_glob_ignore = {}, -- File name glob pattern to ignore when running deletions (e.g. '*.md')
file_regex_ignore = {}, -- File name regex pattern to ignore when running deletions (e.g. '.*[.]md')
preserve_window_layout = { 'this', 'nameless' }, -- Types of deletion that should preserve the window layout
next_buffer_cmd = nil, -- Custom function to retrieve the next buffer when preserving window layout
})

View file

@ -0,0 +1,24 @@
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- set termguicolors to enable highlight groups
vim.opt.termguicolors = true
-- empty setup using defaults
-- require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({
sort_by = "case_sensitive",
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = false,
git_ignored = false
},
})

View file

@ -0,0 +1,4 @@
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldlevel = 99
-- vim.api.nvim_create_autocmd({ "BufEnter" }, { pattern = { "*" }, command = "normal zx zR", }) -- telescope fix.

View file

@ -0,0 +1,43 @@
require('gitsigns').setup {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signcolumn = false, -- Toggle with `:Gitsigns toggle_signs`
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
}
vim.cmd('highlight gitsignscurrentlineblame guibg=#00000000 guifg=#aaaaaa')

View file

@ -0,0 +1 @@
vim.cmd('colorscheme gruvbox-material')

View file

@ -0,0 +1,86 @@
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://git.voronind.com/mirror/packer.nvim.git', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
local available = function(commands)
for _, command in ipairs(commands) do
if vim.fn.executable(command) ~= 1 then
return false
end
end
return true
end
return require('packer').startup(function(use)
--[[
host requirements
- gcc-c++
]]--
use 'https://git.voronind.com/mirror/packer.nvim.git'
use 'https://git.voronind.com/mirror/nvim-web-devicons.git'
use 'https://git.voronind.com/mirror/nvim-tree.lua.git'
use 'https://git.voronind.com/mirror/nvim-lspconfig.git'
use 'https://git.voronind.com/mirror/which-key.nvim.git'
use 'https://git.voronind.com/mirror/bufferline.nvim.git'
-- use 'https://git.voronind.com/mirror/Comment.nvim.git' -- TODO: remove mirror before deleting.
use 'https://git.voronind.com/mirror/SingleComment.nvim.git'
use 'https://git.voronind.com/mirror/lualine.nvim.git'
use 'https://git.voronind.com/mirror/autoclose.nvim.git'
use 'https://git.voronind.com/mirror/winshift.nvim.git'
use 'https://git.voronind.com/mirror/mason.nvim.git'
use 'https://git.voronind.com/mirror/mason-lspconfig.nvim.git'
use 'https://git.voronind.com/mirror/gitsigns.nvim.git'
-- use 'https://git.voronind.com/mirror/nvim-scrollbar.git' -- TODO: remove mirror before deleting.
use 'https://git.voronind.com/mirror/trouble.nvim.git'
use 'https://git.voronind.com/mirror/tokyonight.nvim.git'
use 'https://git.voronind.com/mirror/close-buffers.nvim.git'
use 'https://git.voronind.com/mirror/plenary.nvim.git'
use 'https://git.voronind.com/mirror/telescope.nvim.git'
use 'https://git.voronind.com/mirror/nvim-treesitter.git'
use 'https://git.voronind.com/mirror/todo-comments.nvim.git'
use 'https://git.voronind.com/mirror/align.nvim.git'
use 'https://git.voronind.com/mirror/gruvbox-material.git'
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('packer').sync()
end
-- plugin toggles.
local treesitter = true
-- plugin setup.
require('plugin/mason')
require('plugin/lsp/init')
require('plugin/filetree')
require('plugin/bufferline')
require('plugin/lualine')
require('plugin/autoclose')
require('plugin/winshift')
require('plugin/gitsigns')
-- require('plugin/scrollbar') -- TODO: remove mirror before deleting.
require('plugin/trouble')
require('plugin/tokyonight')
require('plugin/gruvbox')
require('plugin/closebuffers')
require('plugin/telescope')
require('plugin/todo')
if available({'g++'}) then
if treesitter then
require('plugin/treesitter')
require('plugin/fold')
end
end
end)

View file

@ -0,0 +1,4 @@
require('plugin/lsp/rust')
-- require('plugin/lsp/kotlin')
-- require('plugin/lsp/python')
require('plugin/lsp/tex')

View file

@ -0,0 +1,3 @@
local lspconfig = require('lspconfig')
lspconfig.kotlin_language_server.setup {}

View file

@ -0,0 +1,3 @@
local lspconfig = require('lspconfig')
lspconfig.pyright.setup {}

View file

@ -0,0 +1,13 @@
local lspconfig = require('lspconfig')
lspconfig.rust_analyzer.setup {
settings = {
['rust-analyzer'] = {
rustfmt = {
extraArgs = { '--config', 'tab_spaces=2' }
}
},
},
}
vim.g.rust_recommended_style = false

View file

@ -0,0 +1,52 @@
local lspconfig = require('lspconfig')
local config = {
filetypes = { 'text', 'bib', 'gitcommit', 'markdown', 'org', 'plaintex', 'rst', 'rnoweb', 'tex', 'pandoc' },
settings = {
['ltex'] = {
language = "auto"
}
}
}
lspconfig.ltex.setup(config)
vim.api.nvim_create_user_command('SCOn', function (args)
lspconfig.ltex.setup(config)
end, { desc = "Enable spellcheck." })
vim.api.nvim_create_user_command('SCOff', function (args)
lspconfig.ltex.setup { filetypes = {} }
end, { desc = "Disable spellcheck." })
vim.api.nvim_create_user_command('SCLangRU', function (args)
config.settings['ltex'].language = "ru-RU"
lspconfig.ltex.setup(config)
end, { desc = "Set spellcheck to Russian." })
vim.api.nvim_create_user_command('SCLangEN', function (args)
config.settings['ltex'].language = "en-US"
lspconfig.ltex.setup(config)
end, { desc = "Set spellcheck to English." })
vim.api.nvim_create_user_command('SCLangAuto', function (args)
config.settings['ltex'].language = "auto"
lspconfig.ltex.setup(config)
end, { desc = "Set spellcheck to Auto." })
vim.api.nvim_create_user_command('SCForce', function (args)
vim.cmd("setfiletype text")
vim.cmd("SCOn")
end, { desc = "Set buffer type to text." })
vim.api.nvim_create_user_command('SCReset', function (args)
vim.cmd("filetype detect")
vim.cmd("SCLangAuto")
end, { desc = "Set buffer type to auto." })
vim.api.nvim_create_user_command('SCInfo', function (args)
vim.cmd("LspInfo")
end, { desc = "Show info about spellcheck." })
vim.api.nvim_create_user_command('SCInstall', function (args)
vim.cmd("MasonInstall ltex-ls")
end, { desc = "Install spellcheck (requires Mason)." })

View file

@ -0,0 +1,40 @@
require('lualine').setup {
options = {
icons_enabled = true,
-- theme = 'ayu_mirage',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}

View file

@ -0,0 +1,2 @@
require("mason").setup()
require("mason-lspconfig").setup()

View file

@ -0,0 +1,2 @@
require("scrollbar").setup()
require("scrollbar.handlers.gitsigns").setup()

View file

@ -0,0 +1,30 @@
require('telescope').setup{
defaults = {
-- Default configuration for telescope goes here:
-- config_key = value,
mappings = {
i = {
-- map actions.which_key to <C-h> (default: <C-/>)
-- actions.which_key shows the mappings for your picker,
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
["<C-h>"] = "which_key"
}
}
},
pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
},
extensions = {
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
}
}

View file

@ -0,0 +1,64 @@
require('todo-comments').setup {
signs = false, -- show icons in the signs column
sign_priority = 8, -- sign priority
-- keywords recognized as todo comments
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD", -- The gui style to use for the bg highlight group.
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
-- highlighting of the line containing the todo comment
-- * before: highlights before the keyword (typically comment characters)
-- * keyword: highlights of the keyword
-- * after: highlights after the keyword (todo text)
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
-- list of named colors where we try to extract the guifg from the
-- list of highlight groups or use the hex color if hl not found as a fallback
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" }
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
-- regex that will be used to match keywords.
-- don't replace the (KEYWORDS) placeholder
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
},
}

View file

@ -0,0 +1,37 @@
require("tokyonight").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
light_style = "night", -- The theme is used when the background is set to light
transparent = false, -- Enable this to disable setting the background color
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
styles = {
-- Style to be applied to different syntax groups
-- Value is any valid attr-list value for `:help nvim_set_hl`
comments = { italic = true },
keywords = { italic = true },
functions = {},
variables = {},
-- Background styles. Can be "dark", "transparent" or "normal"
sidebars = "dark", -- style for sidebars, see below
floats = "dark", -- style for floating windows
},
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
dim_inactive = false, -- dims inactive windows
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
--- You can override specific color groups to use other groups or a hex color
--- function will be called with a ColorScheme table
---@param colors ColorScheme
on_colors = function(colors) end,
--- You can override specific highlights to use other groups or a hex color
--- function will be called with a Highlights and ColorScheme table
---@param highlights Highlights
---@param colors ColorScheme
on_highlights = function(highlights, colors) end,
})
vim.cmd[[colorscheme tokyonight]]

View file

@ -0,0 +1,23 @@
require('nvim-treesitter.configs').setup {
ensure_installed = "all",
sync_install = false,
auto_install = false,
-- ignore_install = { "javascript" },
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
use_languagetree = true,
-- disable = { "c" },
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
-- disable = {"python"}
},
autotag = {
enable = true
},
rainbow = {
enable = true
},
}

View file

@ -0,0 +1 @@
require('trouble').setup()

View file

@ -0,0 +1,58 @@
require("winshift").setup({
highlight_moving_win = true, -- Highlight the window being moved
focused_hl_group = "Visual", -- The highlight group used for the moving window
moving_win_options = {
-- These are local options applied to the moving window while it's
-- being moved. They are unset when you leave Win-Move mode.
wrap = false,
cursorline = false,
cursorcolumn = false,
colorcolumn = "",
},
keymaps = {
disable_defaults = false, -- Disable the default keymaps
win_move_mode = {
["h"] = "left",
["j"] = "down",
["k"] = "up",
["l"] = "right",
["H"] = "far_left",
["J"] = "far_down",
["K"] = "far_up",
["L"] = "far_right",
["<left>"] = "left",
["<down>"] = "down",
["<up>"] = "up",
["<right>"] = "right",
["<S-left>"] = "far_left",
["<S-down>"] = "far_down",
["<S-up>"] = "far_up",
["<S-right>"] = "far_right",
},
},
---A function that should prompt the user to select a window.
---
---The window picker is used to select a window while swapping windows with
---`:WinShift swap`.
---@return integer? winid # Either the selected window ID, or `nil` to
--- indicate that the user cancelled / gave an invalid selection.
window_picker = function()
return require("winshift.lib").pick_window({
-- A string of chars used as identifiers by the window picker.
picker_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
filter_rules = {
-- This table allows you to indicate to the window picker that a window
-- should be ignored if its buffer matches any of the following criteria.
cur_win = true, -- Filter out the current window
floats = true, -- Filter out floating windows
filetype = {}, -- List of ignored file types
buftype = {}, -- List of ignored buftypes
bufname = {}, -- List of vim regex patterns matching ignored buffer names
},
---A function used to filter the list of selectable windows.
---@param winids integer[] # The list of selectable window IDs.
---@return integer[] filtered # The filtered list of window IDs.
filter_func = nil,
})
end,
})

15
.config/user-dirs.dirs Normal file
View file

@ -0,0 +1,15 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/download"
XDG_TEMPLATES_DIR="$HOME/document/template"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/document"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/media/picture"
XDG_VIDEOS_DIR="$HOME/media/video"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more