Compare commits
No commits in common. "c29c5325b3c17fbb1057424e3c6dbed823b1e13e" and "680f77e31c8e637a15bf953960b0d088011bad8b" have entirely different histories.
c29c5325b3
...
680f77e31c
13 changed files with 88 additions and 245 deletions
56
README.md
56
README.md
|
@ -1,65 +1,37 @@
|
||||||
# home directory configuration
|
# Home Directory Configuration
|
||||||
this is my personal linux home directory configuration.
|
This is my personal linux home directory configuration.
|
||||||
|
|
||||||
use at your own risk!
|
Use at your own risk!
|
||||||
|
|
||||||
## quickstart
|
## Quickstart
|
||||||
|
|
||||||
setting up this configuration is as simple as it gets:
|
Setting up this configuration is as simple as it gets:
|
||||||
``` bash
|
``` bash
|
||||||
git clone https://git.nold.in/nold/dotfiles
|
git clone https://git.nold.in/nold/dotfiles
|
||||||
cd dotfiles && bash setup.sh
|
cd dotfiles && bash setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
to update everything just run `setup.sh` again.
|
To Update everything just run `setup.sh` again.
|
||||||
|
|
||||||
## structure
|
## Structure
|
||||||
|
|
||||||
### bashrc
|
### bashrc
|
||||||
... well ... `~/.bashrc`... will not be linked unlike files contained in `dotfiles` directory, but `source`d. leaving the local `~/.bashrc` intact.
|
... well ... `~/.bashrc`... will not be linked unlike files contained in `dotfiles` directory, but `source`d. Leaving the local `~/.bashrc` intact.
|
||||||
|
|
||||||
### config
|
### config
|
||||||
directories the will be linked to `~/.config/${name}`.
|
Directories the will be linked to `~/.config/${name}`.
|
||||||
|
|
||||||
### configfile
|
### configfile
|
||||||
only files from this directory tree will be linked, to the same directory under `~/.config`
|
Only files from this directory tree will be linked, to the same directory under `~/.config`
|
||||||
|
|
||||||
### dotfiles
|
### dotfiles
|
||||||
files that are directly located under `$home`.
|
Files that are directly located under `$HOME`.
|
||||||
|
|
||||||
### fonts
|
### fonts
|
||||||
fonts that will be copied to `~/.fonts`
|
Fonts that will be copied to `~/.fonts`
|
||||||
|
|
||||||
### hosts
|
### hosts
|
||||||
custom additions to bashrc for specific hostnames. if no specific host is found in `hosts/$(hostname -s)`, `any` will be used.
|
Custom additions to bashrc for specific hostnames. If no specific host is found in `hosts/$(hostname -s)`, `any` will be used.
|
||||||
|
|
||||||
### requirements.txt
|
### requirements.txt
|
||||||
python libs to install using `pip3`.
|
Python libs to install using `pip3`.
|
||||||
|
|
||||||
|
|
||||||
## neovim
|
|
||||||
|
|
||||||
### help
|
|
||||||
|
|
||||||
`<space + ?|tk>` - teleskope keymappings
|
|
||||||
|
|
||||||
### navigation
|
|
||||||
|
|
||||||
`<ctrl+n>` - toggle nvtree
|
|
||||||
|
|
||||||
### editing
|
|
||||||
|
|
||||||
`<space + />`- toggle comment_
|
|
||||||
|
|
||||||
### tabs
|
|
||||||
`<tab>` - next tab
|
|
||||||
`<shift+tab>` - prev tab_
|
|
||||||
|
|
||||||
### terminal
|
|
||||||
|
|
||||||
`<alt+h>` - horizontal terminal
|
|
||||||
`<alt+v>` - vertical terminal
|
|
||||||
|
|
||||||
### system
|
|
||||||
|
|
||||||
`<Space + uu>` - Update NvChad
|
|
||||||
|
|
29
bashrc
29
bashrc
|
@ -1,10 +1,6 @@
|
||||||
source /etc/profile 2>/dev/null
|
source /etc/profile 2>/dev/null
|
||||||
source /etc/profile.d/* 2>/dev/null
|
source /etc/profile.d/* 2>/dev/null
|
||||||
|
|
||||||
if [ -e /usr/bin/gnome-keyring-daemon ] ; then
|
|
||||||
source <(/usr/bin/gnome-keyring-daemon --start --components=ssh)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Change prompt if root
|
# Change prompt if root
|
||||||
if [ $UID -eq 0 ] ; then
|
if [ $UID -eq 0 ] ; then
|
||||||
PROMPT_SUFFIX='\[\033[1;31m\] # \[\033[0m\]'
|
PROMPT_SUFFIX='\[\033[1;31m\] # \[\033[0m\]'
|
||||||
|
@ -26,10 +22,10 @@ function tmux_title {
|
||||||
}
|
}
|
||||||
#tmux_title $(hostname -s)
|
#tmux_title $(hostname -s)
|
||||||
|
|
||||||
if [ -f ~/git/dotfiles/hosts/$(hostname -s)/bashrc ] ; then
|
if [ -f ~/git/homedir-config/hosts/$(hostname -s)/bashrc ] ; then
|
||||||
source ~/git/dotfiles/hosts/$(hostname -s)/bashrc
|
source ~/git/homedir-config/hosts/$(hostname -s)/bashrc
|
||||||
else
|
else
|
||||||
source ~/git/dotfiles/hosts/any/bashrc
|
source ~/git/homedir-config/hosts/any/bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if type nvim &>/dev/null ; then
|
if type nvim &>/dev/null ; then
|
||||||
|
@ -45,24 +41,6 @@ export LESS='-R'
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
export MC_SKIN=$HOME/.mc/lib/solarized.ini
|
export MC_SKIN=$HOME/.mc/lib/solarized.ini
|
||||||
|
|
||||||
# Better History
|
|
||||||
export HISTFILE=~/.bash_history
|
|
||||||
export HISTSIZE=10000000
|
|
||||||
export HISTFILESIZE=10000000
|
|
||||||
export HISTTIMEFORMAT="%F %T "
|
|
||||||
export HISTCONTROL='ignorespace:ignoredups'
|
|
||||||
export HISTIGNORE='l:ls:history'
|
|
||||||
|
|
||||||
|
|
||||||
# Don't render ![0-9] as previous command
|
|
||||||
set +o histexpand
|
|
||||||
# append to history, don't overwrite it
|
|
||||||
shopt -s histappend
|
|
||||||
# attempt to save all lines of a multiple-line command in the same history entry
|
|
||||||
shopt -s cmdhist
|
|
||||||
# save multi-line commands to the history with embedded newlines
|
|
||||||
shopt -s lithist
|
|
||||||
|
|
||||||
#if [ -e ~/.local/bin/virtualenvwrapper.sh ] ; then
|
#if [ -e ~/.local/bin/virtualenvwrapper.sh ] ; then
|
||||||
# # Python stuff
|
# # Python stuff
|
||||||
# export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
|
# export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
|
||||||
|
@ -80,7 +58,6 @@ function json2yaml {
|
||||||
alias ls="ls --color=always --time-style=long-iso -F"
|
alias ls="ls --color=always --time-style=long-iso -F"
|
||||||
alias dfh="df -hT -t ext4 -t zfs -t xfs"
|
alias dfh="df -hT -t ext4 -t zfs -t xfs"
|
||||||
alias lsof='lsof 2>/dev/null | grep'
|
alias lsof='lsof 2>/dev/null | grep'
|
||||||
alias winekiller="ps -ef | grep 'fusion|wine|\.exe' -E -i | awk '{ print \$2}' | xargs kill -9"
|
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
alias gs="git status"
|
alias gs="git status"
|
||||||
|
|
|
@ -1,17 +1,51 @@
|
||||||
-- ChadRC.lua
|
-- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater
|
||||||
local M = {}
|
-- This file is for NvChad options & tools, custom settings are split between here and 'lua/custom/init.lua'
|
||||||
|
|
||||||
-- M.options = {
|
local M = {}
|
||||||
|
local userPlugins = require "custom.plugins"
|
||||||
|
|
||||||
|
M.options = {
|
||||||
-- relativenumber = true,
|
-- relativenumber = true,
|
||||||
-- smarttab = true
|
smarttab = true
|
||||||
-- }
|
}
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
theme = "tokyonight"
|
theme = "tokyonight"
|
||||||
}
|
}
|
||||||
|
|
||||||
M.plugins = "custom.plugins"
|
-- NvChad included plugin options & overrides
|
||||||
M.mappings = require "custom.mappings"
|
M.plugins = {
|
||||||
|
options = {
|
||||||
|
statusline = {
|
||||||
|
separator_style = "slant",
|
||||||
|
}
|
||||||
|
-- lspconfig = {
|
||||||
|
-- path of file containing setups of different lsps (ex : "custom.plugins.lspconfig"), read the docs for more info
|
||||||
|
-- setup_lspconf = "",
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
-- To change the Packer `config` of a plugin that comes with NvChad,
|
||||||
|
-- add a table entry below matching the plugin github name
|
||||||
|
-- '-' -> '_', remove any '.lua', '.nvim' extensions
|
||||||
|
-- this string will be called in a `require`
|
||||||
|
-- use "(custom.configs).my_func()" to call a function
|
||||||
|
-- use "custom.blankline" to call a file
|
||||||
|
--default_plugin_config_replace = {},
|
||||||
|
override = {},
|
||||||
|
remove = {},
|
||||||
|
|
||||||
|
user = userPlugins,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.mappings = {
|
||||||
|
-- custom = {}, -- custom user mappings
|
||||||
|
|
||||||
|
custom = {
|
||||||
|
cheatsheet = "<leader>ch",
|
||||||
|
line_number_toggle = "<leader>n", -- toggle line number
|
||||||
|
update_nvchad = "<leader>uu",
|
||||||
|
new_tab = "<leader>t",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
|
||||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
|
||||||
|
|
||||||
local lspconfig = require "lspconfig"
|
|
||||||
|
|
||||||
-- if you just want default config for the servers then put them in a table
|
|
||||||
local servers = { "ansiblels", "bashls", "pylsp", "yamlls", "marksman", "terraform_lsp", "jsonls" }
|
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
|
||||||
lspconfig[lsp].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
|
||||||
-- lspconfig.pyright.setup { blabla}
|
|
|
@ -1,25 +0,0 @@
|
||||||
local present, null_ls = pcall(require, "null-ls")
|
|
||||||
|
|
||||||
if not present then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local b = null_ls.builtins
|
|
||||||
|
|
||||||
local sources = {
|
|
||||||
|
|
||||||
-- webdev stuff
|
|
||||||
b.formatting.deno_fmt, -- choosed deno for ts/js files cuz its very fast!
|
|
||||||
b.formatting.prettier.with { filetypes = { "html", "markdown", "css" } }, -- so prettier works only on these filetypes
|
|
||||||
|
|
||||||
-- Lua
|
|
||||||
b.formatting.stylua,
|
|
||||||
|
|
||||||
-- cpp
|
|
||||||
b.formatting.clang_format,
|
|
||||||
}
|
|
||||||
|
|
||||||
null_ls.setup {
|
|
||||||
debug = true,
|
|
||||||
sources = sources,
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.treesitter = {
|
|
||||||
ensure_installed = {
|
|
||||||
"diff",
|
|
||||||
"gitcommit",
|
|
||||||
"git_rebase",
|
|
||||||
"yaml",
|
|
||||||
"toml",
|
|
||||||
"dockerfile",
|
|
||||||
"python",
|
|
||||||
"go",
|
|
||||||
"php",
|
|
||||||
"make",
|
|
||||||
"jq",
|
|
||||||
"bash",
|
|
||||||
"json5",
|
|
||||||
"vim",
|
|
||||||
"lua",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"javascript",
|
|
||||||
"c",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enable = true,
|
|
||||||
disable = {
|
|
||||||
"python"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
M.mason = {
|
|
||||||
ensure_installed = {
|
|
||||||
-- LSP:
|
|
||||||
"yaml-language-server",
|
|
||||||
"python-lsp-server",
|
|
||||||
"lua-language-server",
|
|
||||||
"bash-language-server",
|
|
||||||
"ansible-language-server",
|
|
||||||
"dockerfile-language-server",
|
|
||||||
"json-lsp",
|
|
||||||
"marksman",
|
|
||||||
"terraform-ls",
|
|
||||||
|
|
||||||
-- Formater:
|
|
||||||
"yamlfmt",
|
|
||||||
"shfmt",
|
|
||||||
"fixjson",
|
|
||||||
|
|
||||||
-- Linter:
|
|
||||||
"gitlint",
|
|
||||||
"yamllint",
|
|
||||||
"prettier",
|
|
||||||
"markdownlint",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- git support in nvimtree
|
|
||||||
M.nvimtree = {
|
|
||||||
git = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
renderer = {
|
|
||||||
highlight_git = true,
|
|
||||||
icons = {
|
|
||||||
show = {
|
|
||||||
git = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,8 +1,8 @@
|
||||||
-- AutoCMD:
|
-- AutoCMD:
|
||||||
-- vim.cmd([[
|
--vim.cmd([[
|
||||||
-- stuff
|
-- stuff
|
||||||
-- stuff
|
-- stuff
|
||||||
-- ]])
|
--]])
|
||||||
|
|
||||||
-- Open a file from its last left off position
|
-- Open a file from its last left off position
|
||||||
vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
|
vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
|
||||||
|
@ -12,3 +12,4 @@ vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]]
|
||||||
|
|
||||||
-- File extension specific tabbing
|
-- File extension specific tabbing
|
||||||
vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]]
|
vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]]
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
---@type MappingsTable
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.general = {
|
|
||||||
n = {
|
|
||||||
[";"] = { ":", "enter command mode", opts = { nowait = true } },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- more keybinds!
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,28 +0,0 @@
|
||||||
local overrides = require("custom.configs.overrides")
|
|
||||||
|
|
||||||
---@type NvPluginSpec[]
|
|
||||||
local plugins = {
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
dependencies = {
|
|
||||||
-- format & linting
|
|
||||||
{
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
config = function()
|
|
||||||
require "custom.configs.null-ls"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require "plugins.configs.lspconfig"
|
|
||||||
require "custom.configs.lspconfig"
|
|
||||||
end, -- Override to setup mason-lspconfig
|
|
||||||
},
|
|
||||||
-- overrde plugin configs
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = overrides.treesitter,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return plugins
|
|
21
configfile/nvim/lua/custom/plugins/init.lua
Normal file
21
configfile/nvim/lua/custom/plugins/init.lua
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
-- Additional Plugins
|
||||||
|
--
|
||||||
|
return {
|
||||||
|
['cappyzawa/trim.nvim'] = {
|
||||||
|
config = function()
|
||||||
|
require('trim').setup({
|
||||||
|
-- if you want to ignore markdown file.
|
||||||
|
-- you can specify filetypes.
|
||||||
|
disable = {"markdown"},
|
||||||
|
|
||||||
|
-- if you want to ignore space of top
|
||||||
|
patterns = {
|
||||||
|
[[%s/\s\+$//e]], -- remove unwanted spaces
|
||||||
|
[[%s/\($\n\s*\)\+\%$//]], -- trim last line
|
||||||
|
[[%s/\%^\n\+//]], -- trim first line
|
||||||
|
-- [[%s/\(\n\n\)\n\+/\1/]], -- replace multiple blank lines with a single line
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,7 +6,6 @@ bind C-a send-prefix
|
||||||
|
|
||||||
## Default is 'screen'
|
## Default is 'screen'
|
||||||
set -sg default-terminal 'xterm-256color'
|
set -sg default-terminal 'xterm-256color'
|
||||||
set-option -a terminal-overrides ",*256col*:RGB"
|
|
||||||
set -sg escape-time 1
|
set -sg escape-time 1
|
||||||
set -sg set-clipboard on
|
set -sg set-clipboard on
|
||||||
set -g history-limit 100000
|
set -g history-limit 100000
|
||||||
|
|
|
@ -5,7 +5,7 @@ if which powerline-daemon &>/dev/null; then
|
||||||
POWERLINE_BASH_SELECT=1
|
POWERLINE_BASH_SELECT=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYVERSION=$(python3 --version | grep -Eo '[0-9]\.[0-9]+')
|
PYVERSION=$(python3 --version | grep -Eo '[0-9]\.[0-9]')
|
||||||
if [ -f $HOME/.venv/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh ]; then
|
if [ -f $HOME/.venv/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh ]; then
|
||||||
export VIRTUAL_ENV="$HOME/.venv"
|
export VIRTUAL_ENV="$HOME/.venv"
|
||||||
export PATH=$VIRTUAL_ENV/bin:$PATH
|
export PATH=$VIRTUAL_ENV/bin:$PATH
|
||||||
|
@ -33,6 +33,4 @@ elif [ -f ~/.local/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/
|
||||||
source ~/.local/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh
|
source ~/.local/lib/python${PYVERSION}/site-packages/powerline/bindings/bash/powerline.sh
|
||||||
elif [ -f /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh ]; then
|
elif [ -f /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh ]; then
|
||||||
source /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh
|
source /usr/local/lib/python${PYVERSION}/dist-packages/powerline/bindings/bash/powerline.sh
|
||||||
elif [ -f /usr/share/powerline/bindings/bash/powerline.sh ] ; then
|
|
||||||
source /usr/share/powerline/bindings/bash/powerline.sh
|
|
||||||
fi
|
fi
|
||||||
|
|
2
setup.sh
2
setup.sh
|
@ -66,7 +66,7 @@ linkfiles 'dotfiles/*'
|
||||||
|
|
||||||
# NeoVIM & NvChad
|
# NeoVIM & NvChad
|
||||||
git-sync https://github.com/NvChad/NvChad ~/.config/nvim
|
git-sync https://github.com/NvChad/NvChad ~/.config/nvim
|
||||||
nvim +'hi NormalFloat guibg=#1e222a' +PackerSync +':TSInstall diff lua markdown cpp gitcommit git_rebase yaml toml dockerfile python go php make jq bash vim json5'
|
nvim +'hi NormalFloat guibg=#1e222a' +PackerSync
|
||||||
|
|
||||||
# Link Config Directories
|
# Link Config Directories
|
||||||
linkfiles 'config/*'
|
linkfiles 'config/*'
|
||||||
|
|
Loading…
Reference in a new issue