This commit is contained in:
parent
365e0feddc
commit
ce19d6a62c
24 changed files with 212 additions and 96 deletions
|
@ -1,7 +1,7 @@
|
|||
If:
|
||||
PathMatch: '.*\.(c|h)'
|
||||
CompileFlags:
|
||||
Add: [ -std=c99 ]
|
||||
Add: [ -xc, -std=c99 ]
|
||||
|
||||
---
|
||||
If:
|
||||
|
|
41
.config/nvim/.luarc.json
Normal file
41
.config/nvim/.luarc.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"workspace.library": [
|
||||
"/home/wzray/.local/share/nvim/lazy/neodev.nvim/types/stable",
|
||||
"/usr/share/nvim/runtime/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-surround/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/telescope-fzf-native.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-tree.lua/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/cmp-nvim-lsp/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/cmp-buffer/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/lspkind.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/lualine.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-web-devicons/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-treesitter-textobjects/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-treesitter-context/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-treesitter/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/indent-blankline.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-notify/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-colorizer.lua/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/mason.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/lazy.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/LuaSnip/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-lastplace/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/telescope.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/Navigator.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/trouble.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/bufferline.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/Comment.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-lspconfig/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/neodev.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/onedark.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/plenary.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/fidget.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-autopairs/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/todo-comments.nvim/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/nvim-cmp/lua",
|
||||
"/home/wzray/.local/share/nvim/lazy/telescope-emoji.nvim/lua",
|
||||
"/usr/share/nvim/runtime",
|
||||
"/home/wzray/.dotfiles/.config/nvim/lua",
|
||||
"${3rd}/luv/library"
|
||||
]
|
||||
}
|
|
@ -33,6 +33,8 @@
|
|||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||
"vim-bbcode": { "branch": "master", "commit": "6fb28c6deae5844ee2bf0b97ef2fea04bd3d4eac" },
|
||||
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" },
|
||||
"vim-peekaboo": { "branch": "master", "commit": "cc4469c204099c73dd7534531fa8ba271f704831" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
|
||||
|
|
|
@ -9,7 +9,7 @@ vim.wo.relativenumber = true
|
|||
vim.o.mouse = 'a'
|
||||
|
||||
-- Indentation
|
||||
vim.o.tabstop = 8
|
||||
vim.o.tabstop = 4
|
||||
vim.o.expandtab = true
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.autoindent = true
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
local servers = {
|
||||
bashls = {},
|
||||
cmake = {},
|
||||
clangd = {},
|
||||
eslint = {},
|
||||
gopls = {},
|
||||
|
@ -8,9 +9,12 @@ local servers = {
|
|||
kotlin_language_server = {},
|
||||
lua_ls = require('lsp.lua_ls'),
|
||||
pyright = {},
|
||||
ruby_lsp = {},
|
||||
rust_analyzer = {},
|
||||
ts_ls = {},
|
||||
ruby_lsp = {},
|
||||
yamlls = require('lsp.yamlls'),
|
||||
jsonls = {},
|
||||
svls = {}
|
||||
}
|
||||
|
||||
vim.lsp.set_log_level("debug")
|
||||
|
@ -44,22 +48,6 @@ end
|
|||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
for server_name, config in pairs(servers) do
|
||||
lspconfig[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
[server_name] = config ~= {} and {
|
||||
settings = {
|
||||
[server_name] = {
|
||||
config
|
||||
}
|
||||
}
|
||||
} or {}
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
for server_name, config in pairs(servers) do
|
||||
lspconfig[server_name].setup(vim.tbl_deep_extend('keep', {
|
||||
capabilities = capabilities,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
return {
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
settings = {
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
return {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = true,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = true,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
9
.config/nvim/lua/lsp/yamlls.lua
Normal file
9
.config/nvim/lua/lsp/yamlls.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
settings = {
|
||||
redhat = {
|
||||
telemetry = {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
return {
|
||||
'isobit/vim-caddyfile',
|
||||
'rcarriga/nvim-notify',
|
||||
'stefandtw/quickfix-reflector.vim',
|
||||
'tpope/vim-fugitive',
|
||||
'junegunn/vim-peekaboo',
|
||||
'tpope/vim-sleuth',
|
||||
'vim-scripts/iptables',
|
||||
{ 'akinsho/bufferline.nvim', opts = {}, dependencies = { 'navarasu/onedark.nvim' } },
|
||||
|
@ -12,4 +14,5 @@ return {
|
|||
{ 'norcalli/nvim-colorizer.lua', opts={ '*' }, dependencies = { 'navarasu/onedark.nvim' } },
|
||||
-- { 'wakatime/vim-wakatime', event = 'VeryLazy' },
|
||||
{ 'williamboman/mason.nvim', opts = {} },
|
||||
'Winseven4lyf/vim-bbcode',
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
'junegunn/vim-peekaboo',
|
||||
config = function ()
|
||||
vim.g.peekaboo_window = 'enew'
|
||||
end
|
||||
}
|
|
@ -7,12 +7,16 @@ return {
|
|||
build = ':TSUpdate',
|
||||
config = function()
|
||||
vim.defer_fn(function()
|
||||
-- - @diagnostic disable-next-line: missing-fields
|
||||
--- @diagnostic disable-next-line: missing-fields
|
||||
require('nvim-treesitter.configs').setup({
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
|
||||
require('treesitter-context').setup {
|
||||
max_lines = 6
|
||||
}
|
||||
end, 0)
|
||||
end
|
||||
}
|
||||
|
|
30
.config/nvim/lua/plugins/ufo.lua
Normal file
30
.config/nvim/lua/plugins/ufo.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
return {
|
||||
-- 'kevinhwang91/nvim-ufo',
|
||||
-- dependencies = {
|
||||
-- 'kevinhwang91/promise-async'
|
||||
-- },
|
||||
-- config = function()
|
||||
-- vim.defer_fn(function()
|
||||
-- vim.o.foldcolumn = '0'
|
||||
-- vim.o.foldlevel = 99
|
||||
-- vim.o.foldlevelstart = 99
|
||||
-- vim.o.foldenable = true
|
||||
--
|
||||
-- vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
-- vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
--
|
||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
-- capabilities.textDocument.foldingRange = {
|
||||
-- dynamicRegistration = false,
|
||||
-- lineFoldingOnly = true
|
||||
-- }
|
||||
-- local language_servers = vim.lsp.get_clients()
|
||||
-- for _, ls in ipairs(language_servers) do
|
||||
-- require('lspconfig')[ls].setup({
|
||||
-- capabilities = capabilities
|
||||
-- })
|
||||
-- end
|
||||
-- require('ufo').setup()
|
||||
-- end, 0)
|
||||
-- end
|
||||
}
|
|
@ -1,11 +1,12 @@
|
|||
[ -f "~/.config/.fix-tty" ] || return
|
||||
[ -f "$HOME/.config/.fix-tty" ] || return
|
||||
|
||||
process_id="$$"
|
||||
(
|
||||
if [ "$(inxi -aG | grep -c 'Monitor')" -eq 1 ]; then
|
||||
setfont Uni3-Terminus32x16.psf.gz
|
||||
if [ "$(inxi -aG | grep -c 'Monitor')" = "1" ]; then
|
||||
setfont ter-v32n
|
||||
stty -F /proc/$process_id/fd/0 rows 65 cols 195
|
||||
else
|
||||
setfont Uni3-Terminus16.psf.gz
|
||||
setfont ter-v16n
|
||||
stty -F /proc/$process_id/fd/0 rows 90 cols 320
|
||||
fi >/dev/null 2>&1 &
|
||||
)
|
||||
|
|
|
@ -32,6 +32,7 @@ bindkey "^[[1;3C" forward-word
|
|||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;3D" backward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[3~" delete-char
|
||||
|
||||
bindkey "^[n" backward-word
|
||||
bindkey "^[m" forward-word
|
||||
|
@ -88,10 +89,13 @@ alias d="diff --color -u "
|
|||
alias rgf="rg --files | rg "
|
||||
alias 7z="7zz" # for whatever reason 7z provides 7zz binary in debian
|
||||
alias wt="watch --color -d -cn 0.1 "
|
||||
alias cal="ncal -b"
|
||||
alias .e="source .env"
|
||||
alias .e="set -a && source .env && set +a"
|
||||
alias vimu="vim -u /dev/null"
|
||||
alias reswap="sudo swapoff /swapfile && sudo swapon /swapfile"
|
||||
alias reswap="sudo bash -c 'echo Working...; swapoff /swapfile && sudo swapon /swapfile'"
|
||||
alias make="make -j$(nproc)"
|
||||
alias py="python3"
|
||||
alias neofetch="fastfetch"
|
||||
alias open="xdg-open"
|
||||
|
||||
# function aliases
|
||||
bl() { brightnessctl set "$1"% > /dev/null; }
|
||||
|
@ -107,12 +111,15 @@ compdef '_files -g "*.md"' md
|
|||
# git aliases
|
||||
gl() { git log --decorate "$@" | bat }; compdef '_git; _git-log' gl
|
||||
gus() { git branch --set-upstream-to="${1:?}/${2:?}" "${2:?}"}; compdef '_git; _git-push' gus
|
||||
gpo() { git push --set-upstream origin ${1:-$(git rev-parse --abbrev-ref HEAD)}}
|
||||
alias ga="git add"
|
||||
alias gb="git branch"
|
||||
alias gc="git commit"
|
||||
alias gca="git commit --amend --no-edit"
|
||||
alias gca="git commit --allow-empty-message --amend --no-edit"
|
||||
alias gck="git checkout"
|
||||
alias gcl="git clone"
|
||||
alias gcls="git clone --depth=1"
|
||||
alias gcm="git commit --allow-empty-message -m ''"
|
||||
alias gcn="git clean"
|
||||
alias gcp="git cherry-pick"
|
||||
alias gd="git diff"
|
||||
|
@ -122,7 +129,6 @@ alias gi="git init"
|
|||
alias gla="gl --all"
|
||||
alias gm="git merge"
|
||||
alias gp="git push"
|
||||
alias gpo="git push origin"
|
||||
alias gpu="git pull"
|
||||
alias gr="git restore"
|
||||
alias grj="git rebase"
|
||||
|
@ -134,9 +140,10 @@ alias grt="git reset"
|
|||
alias gs="git status"
|
||||
alias gsc="git switch -c"
|
||||
alias gsh="git show"
|
||||
alias gsp="git stash pop"
|
||||
alias gsj="git stash"
|
||||
alias gsp="git stash pop"
|
||||
alias gt="git tag"
|
||||
alias gus="git fetch --unshallow"
|
||||
|
||||
# docker aliases
|
||||
alias dc="docker compose"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue