initial commit
This commit is contained in:
commit
f51cb50d6b
25 changed files with 325 additions and 0 deletions
8
.alias
Normal file
8
.alias
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
export EXA_COLORS="ur=0:uw=0:ux=0:ue=0:gr=0:gw=0:gx=0:tr=0:tw=0:tx=0:su=0:sf=0"
|
||||||
|
alias ls="eza --group-directories-first --group --binary"
|
||||||
|
alias diff=difft
|
||||||
|
alias du=dust
|
||||||
|
alias cat="bat --style=header"
|
||||||
|
|
||||||
|
alias sd="sd -p"
|
||||||
|
alias feh="feh -."
|
44
.bashrc
Normal file
44
.bashrc
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#
|
||||||
|
# ~/.bashrc
|
||||||
|
#
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
# kdesrc-build #################################################################
|
||||||
|
|
||||||
|
## Add kdesrc-build to PATH
|
||||||
|
export PATH="/usr/bin:$PATH"
|
||||||
|
|
||||||
|
## Autocomplete for kdesrc-run
|
||||||
|
function _comp_kdesrc_run
|
||||||
|
{
|
||||||
|
local cur
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
|
||||||
|
# Complete only the first argument
|
||||||
|
if [[ $COMP_CWORD != 1 ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Retrieve build modules through kdesrc-run
|
||||||
|
# If the exit status indicates failure, set the wordlist empty to avoid
|
||||||
|
# unrelated messages.
|
||||||
|
local modules
|
||||||
|
if ! modules=$(kdesrc-run --list-installed);
|
||||||
|
then
|
||||||
|
modules=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Return completions that match the current word
|
||||||
|
COMPREPLY=( $(compgen -W "${modules}" -- "$cur") )
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
## Register autocomplete function
|
||||||
|
complete -o nospace -F _comp_kdesrc_run kdesrc-run
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
5
.clang-format
Normal file
5
.clang-format
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
TabWidth: '2'
|
||||||
|
UseTab: Never
|
||||||
|
IndentCaseLabels: true
|
||||||
|
ColumnLimit: 120
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
nvim/plugged
|
||||||
|
**/.git
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "dotconfig/fish/plugin-foreign-env"]
|
||||||
|
path = dotconfig/fish/plugin-foreign-env
|
||||||
|
url = https://github.com/oh-my-fish/plugin-foreign-env
|
8
.inputrc
Normal file
8
.inputrc
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
$include /etc/inputrc
|
||||||
|
set completion-ignore-case On
|
||||||
|
#"\C-h": backward-kill-word
|
||||||
|
|
||||||
|
"\e[5~" history-search-backward
|
||||||
|
"\e[6~" history-search-forward
|
||||||
|
"\e[A" history-search-backward
|
||||||
|
"\e[B" history-search-forward
|
33
.profile
Normal file
33
.profile
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
if [ -z "$DOTPROFILE_SOURCED" ]; then
|
||||||
|
|
||||||
|
export DOTPROFILE_SOURCED=1
|
||||||
|
|
||||||
|
#export GTK_USE_PORTAL=1 this causes an issue with non-80/443 ports in Firefox
|
||||||
|
export MOZ_USE_XINPUT2=1
|
||||||
|
export MOZ_X11_EGL=1
|
||||||
|
#export MOZ_DISABLE_RDD_SANDBOX=1
|
||||||
|
export SDL_VIDEO_ALLOW_SCREENSAVER=1
|
||||||
|
|
||||||
|
export GDK_BACKEND=$XDG_SESSION_TYPE
|
||||||
|
if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Disable PC speaker
|
||||||
|
#[[ $DISPLAY ]] && xset b off &&
|
||||||
|
# Allow running graphical apps from Distrobox
|
||||||
|
#xhost +si:localuser:$USER
|
||||||
|
|
||||||
|
export GHCUP_INSTALL_BASE_PREFIX=$HOME/.ghcup
|
||||||
|
[ -x $GHCUP_INSTALL_BASE_PREFIX/bin ] && PATH=$GHCUP_INSTALL_BASE_PREFIX/bin:$PATH || true
|
||||||
|
|
||||||
|
[ -x $HOME/.yarn/bin ] && PATH=$HOME/.yarn/bin:$PATH || true
|
||||||
|
[ -x $HOME/.cargo/bin ] && PATH=$HOME/.cargo/bin:$PATH || true
|
||||||
|
#[ -x $HOME/.platformio/penv/bin ] && PATH=$HOME/.platformio/penv/bin:$PATH || true
|
||||||
|
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
export GIT_EXTERNAL_DIFF=difft
|
||||||
|
|
||||||
|
fi
|
6
.tmux.conf
Normal file
6
.tmux.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
set -s escape-time 0
|
||||||
|
|
||||||
|
bind h select-pane -U
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -L
|
||||||
|
bind l select-pane -R
|
12
dotconfig/fish/config.fish
Normal file
12
dotconfig/fish/config.fish
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
if status is-interactive
|
||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_greeting
|
||||||
|
end
|
||||||
|
|
||||||
|
source /etc/alias
|
||||||
|
source $HOME/.alias
|
||||||
|
|
||||||
|
set fish_function_path $fish_function_path $HOME/.config/fish/plugin-foreign-env/functions
|
||||||
|
fenv source $HOME/.profile
|
31
dotconfig/fish/fish_variables
Normal file
31
dotconfig/fish/fish_variables
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR __fish_initialized:3400
|
||||||
|
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:blue
|
||||||
|
SETUVAR fish_color_comment:red
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:green
|
||||||
|
SETUVAR fish_color_error:brred
|
||||||
|
SETUVAR fish_color_escape:brcyan
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:yellow
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:brcyan
|
||||||
|
SETUVAR fish_color_param:cyan
|
||||||
|
SETUVAR fish_color_quote:yellow
|
||||||
|
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
|
||||||
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR fish_pager_color_selected_background:\x2dr
|
3
dotconfig/fish/functions/mkcd.fish
Normal file
3
dotconfig/fish/functions/mkcd.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function mkcd
|
||||||
|
mkdir -p $argv[1] && cd $argv[1]
|
||||||
|
end
|
1
dotconfig/fish/plugin-foreign-env
Submodule
1
dotconfig/fish/plugin-foreign-env
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 7f0cf099ae1e1e4ab38f46350ed6757d54471de7
|
3
dotconfig/gdb/gdbinit
Normal file
3
dotconfig/gdb/gdbinit
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
set debuginfod enabled off
|
||||||
|
layout src
|
||||||
|
focus cmd
|
4
dotconfig/nvim/after/ftplugin/make.lua
Normal file
4
dotconfig/nvim/after/ftplugin/make.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
vim.opt_local.tabstop = 4
|
||||||
|
vim.opt_local.softtabstop = 4
|
||||||
|
vim.opt_local.shiftwidth = 4
|
||||||
|
vim.opt_local.expandtab = false
|
4
dotconfig/nvim/after/ftplugin/tex.lua
Normal file
4
dotconfig/nvim/after/ftplugin/tex.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
vim.opt_local.textwidth = 80
|
||||||
|
vim.opt_local.conceallevel = 2
|
||||||
|
vim.g.tex_flavor = 'latex'
|
||||||
|
vim.g.tex_conceal = 'abdmg'
|
1
dotconfig/nvim/init.lua
Normal file
1
dotconfig/nvim/init.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require('modules')
|
20
dotconfig/nvim/lua/modules/autocmd.lua
Normal file
20
dotconfig/nvim/lua/modules/autocmd.lua
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
-- see :help restore-cursor and https://github.com/neovim/neovim/issues/16339#issuecomment-1457394370
|
||||||
|
vim.api.nvim_create_autocmd('BufRead', {
|
||||||
|
callback = function(opts)
|
||||||
|
vim.api.nvim_create_autocmd('BufWinEnter', {
|
||||||
|
once = true,
|
||||||
|
buffer = opts.buf,
|
||||||
|
callback = function()
|
||||||
|
local ft = vim.bo[opts.buf].filetype
|
||||||
|
local last_known_line = vim.api.nvim_buf_get_mark(opts.buf, '"')[1]
|
||||||
|
if
|
||||||
|
not (ft:match('commit') and ft:match('rebase'))
|
||||||
|
and last_known_line > 1
|
||||||
|
and last_known_line <= vim.api.nvim_buf_line_count(opts.buf)
|
||||||
|
then
|
||||||
|
vim.api.nvim_feedkeys([[g`"]], 'nx', false)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
9
dotconfig/nvim/lua/modules/init.lua
Normal file
9
dotconfig/nvim/lua/modules/init.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
require('modules.plugged')
|
||||||
|
|
||||||
|
require('modules.set')
|
||||||
|
require('modules.autocmd')
|
||||||
|
require('modules.theme')
|
||||||
|
require('modules.keymap')
|
||||||
|
require('modules.treesitter')
|
||||||
|
require('modules.lsp')
|
||||||
|
require('modules.vimtex')
|
3
dotconfig/nvim/lua/modules/keymap.lua
Normal file
3
dotconfig/nvim/lua/modules/keymap.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
vim.keymap.set('v', '<F2>', '"+y')
|
||||||
|
vim.keymap.set('n', '<F2>', '"+p')
|
||||||
|
vim.keymap.set('i', '<C-BS>', '<C-W>')
|
52
dotconfig/nvim/lua/modules/lsp.lua
Normal file
52
dotconfig/nvim/lua/modules/lsp.lua
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
local lsp_zero = require('lsp-zero')
|
||||||
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
|
lsp_zero.default_keymaps({buffer = bufnr})
|
||||||
|
|
||||||
|
-- rename symbol
|
||||||
|
vim.keymap.set('', '<F2>', vim.lsp.buf.rename, {noremap = true})
|
||||||
|
|
||||||
|
-- tab completion
|
||||||
|
lsp_zero.extend_cmp()
|
||||||
|
local cmp = require('cmp')
|
||||||
|
cmp.setup({
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-space>'] = cmp.mapping.complete(),
|
||||||
|
|
||||||
|
['<Tab>'] = cmp.mapping(
|
||||||
|
function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
if #cmp.get_entries() == 1 then
|
||||||
|
cmp.confirm({ select = true })
|
||||||
|
else
|
||||||
|
cmp.select_next_item()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{ 'i', 's' }
|
||||||
|
),
|
||||||
|
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
-- ['<Esc>'] = cmp.mapping.abort(),
|
||||||
|
|
||||||
|
['<C-j>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-k>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- signature help
|
||||||
|
require('lsp_signature').setup({ floating_window_above_cur_line = true })
|
||||||
|
|
||||||
|
-- auto-format
|
||||||
|
-- vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
-- callback = vim.lsp.buf.format,
|
||||||
|
-- })
|
||||||
|
end)
|
||||||
|
|
||||||
|
local lsp_config = require('lspconfig')
|
||||||
|
lsp_config['clangd'].setup({})
|
||||||
|
lsp_config['rust_analyzer'].setup({})
|
||||||
|
lsp_config['texlab'].setup({})
|
||||||
|
lsp_config['pylsp'].setup({})
|
12
dotconfig/nvim/lua/modules/plugged.lua
Normal file
12
dotconfig/nvim/lua/modules/plugged.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
local Plug = vim.fn['plug#']
|
||||||
|
vim.call('plug#begin')
|
||||||
|
Plug('christoomey/vim-tmux-navigator')
|
||||||
|
Plug('neovim/nvim-lspconfig')
|
||||||
|
Plug('hrsh7th/nvim-cmp')
|
||||||
|
Plug('hrsh7th/cmp-nvim-lsp')
|
||||||
|
Plug('L3MON4D3/LuaSnip')
|
||||||
|
Plug('VonHeikemen/lsp-zero.nvim', { ['branch'] = 'v3.x' })
|
||||||
|
Plug('ray-x/lsp_signature.nvim')
|
||||||
|
Plug('lervag/vimtex')
|
||||||
|
Plug('nvim-treesitter/nvim-treesitter', { ['do'] = ':TSUpdate'})
|
||||||
|
vim.call('plug#end')
|
11
dotconfig/nvim/lua/modules/set.lua
Normal file
11
dotconfig/nvim/lua/modules/set.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
vim.o.tabstop = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.autoindent = true
|
||||||
|
vim.o.smartindent = true
|
||||||
|
vim.o.number = true
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
-- this is default in neovim
|
||||||
|
-- vim.cmd('filetype plugin indent on')
|
||||||
|
-- vim.cmd('syntax on')
|
12
dotconfig/nvim/lua/modules/theme.lua
Normal file
12
dotconfig/nvim/lua/modules/theme.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
-- why is this so dark by default anyway
|
||||||
|
vim.api.nvim_set_hl(0, 'Conceal', {})
|
||||||
|
vim.api.nvim_set_hl(0, 'Normal', {
|
||||||
|
bg = 'NONE',
|
||||||
|
fg = 'NvimLightGrey2'
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_hl(0, 'LineNr', {
|
||||||
|
fg = 'NvimLightGrey4'
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_hl(0, 'NonText', {
|
||||||
|
fg = 'NvimLightGrey4'
|
||||||
|
})
|
24
dotconfig/nvim/lua/modules/treesitter.lua
Normal file
24
dotconfig/nvim/lua/modules/treesitter.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
-- TODO: why does this cause errors
|
||||||
|
-- vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
-- pattern = 'c,lua,python,rust,bash,js',
|
||||||
|
-- callback = vim.treesitter.start,
|
||||||
|
-- })
|
||||||
|
-- -- TEMP: treesitter for cpp
|
||||||
|
-- vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
-- pattern = 'cpp',
|
||||||
|
-- callback = function()
|
||||||
|
-- vim.treesitter.language.register('c', { 'cpp' })
|
||||||
|
-- vim.treesitter.start()
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- TEMP: treesitter for vimscript
|
||||||
|
-- vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
-- pattern = 'vim',
|
||||||
|
-- callback = function()
|
||||||
|
-- vim.treesitter.language.add('vim',
|
||||||
|
-- { path = '/home/deneb/git/tree-sitter-vim/libtree-sitter-vim.so' })
|
||||||
|
-- vim.treesitter.start()
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
|
||||||
|
require('nvim-treesitter.configs').setup({ highlight = { enable = true }})
|
14
dotconfig/nvim/lua/modules/vimtex.lua
Normal file
14
dotconfig/nvim/lua/modules/vimtex.lua
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
vim.g.vimtex_view_method = 'general'
|
||||||
|
vim.g.vimtex_view_general_viewer = 'okular'
|
||||||
|
vim.g.vimtex_view_general_options = '--unique file:@pdf\\#src:@line@tex'
|
||||||
|
vim.g.vimtex_compiler_method = 'tectonic'
|
||||||
|
vim.g.vimtex_quickfix_mode = 0
|
||||||
|
-- vim.g.vimtex_compiler_tectonic = {
|
||||||
|
-- [ 'options' ] = {
|
||||||
|
-- '--shell-escape',
|
||||||
|
-- '--verbose',
|
||||||
|
-- '--file-line-error',
|
||||||
|
-- '--synctex',
|
||||||
|
-- '--keep-logs'
|
||||||
|
-- },
|
||||||
|
-- }
|
Loading…
Reference in a new issue