Deleting old unused stuff, move some configs to _saved.

This commit is contained in:
Bartek Stalewski 2024-11-03 23:22:21 +01:00
parent 623c114870
commit 9e8fd82547
No known key found for this signature in database
37 changed files with 1 additions and 408 deletions

View file

@ -1,14 +0,0 @@
return {
ColorColumn = { bg = "#770000" },
DiffChange = { bg = NONE, fg = "#e7c547" },
DiffText = { bg = NONE, fg = "#ff8700" },
FoldColumn = { bg = NONE },
LineNr = { bg = NONE, fg = "#465457" },
NonText = { bg = NONE },
Normal = { bg = NONE },
SignColumn = { bg = NONE },
SpellBad = { bg = "#770000", fg = "#ffffff" },
TelescopeNormal = { bg = NONE },
Visual = { bg = "#005577", fg = "#ffffff" },
NormalFloat = { bg = NONE },
}

View file

@ -1,12 +0,0 @@
return {
colorscheme = "monokai",
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = {"*.gotmpl"},
callback = function() vim.bo.filetype = "yaml" end,
}),
vim.api.nvim_create_autocmd({ "VimLeave" }, {
callback = function()
vim.fn.jobstart("", { detach = true })
end,
}),
}

View file

@ -1,17 +0,0 @@
return {
i = {
["<C-a>"] = { "<esc>I" },
["<C-e>"] = { "<esc>A" },
},
n = {
["<esc><cr>"] = { "<esc><cmd>wq!<cr>", silent = true },
["<leader>c"] = { '<cmd>execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")<cr>', silent = true, desc = "Toggle Column" },
["<leader>h"] = { "<cmd>set hlsearch!<cr>", silent = true, desc = "Toggle hlsearch" },
["<leader>j"] = { "<cmd>bprevious<cr>", silent = true, desc = "Buffer Previous" },
["<leader>k"] = { "<cmd>bnext<cr>", silent = true, desc = "Buffer Next" },
["<leader>n"] = { '<cmd>set number!<cr><cmd>IBLToggle<cr><cmd>execute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")<cr>', silent = true, desc = "Toggle Decorations" },
["<leader>w"] = { "<cmd>lua require('whitespace-nvim').trim()<cr>", silent = true, desc = "Trim Trailing Whitespaces" },
["<leader>x"] = { "<cmd>bd<cr>", silent = true, desc = "close buffer" },
["<tab>"] = { "<C-w>w", silent = true },
},
}

View file

@ -1,31 +0,0 @@
return {
opt = {
cursorcolumn = true,
cursorline = true,
expandtab = true,
gdefault = true,
hlsearch = false,
ignorecase = true,
number = true,
shiftround = true,
relativenumber = false,
showmode = false,
smartcase = true,
splitbelow = true,
splitright = true,
termguicolors = true,
wrap = true,
whichwrap = '',
writebackup = false,
clipboard = "",
cmdheight = 1,
foldcolumn = "0",
laststatus = 2,
mouse = "",
scrolloff = 5,
shiftwidth = 2,
softtabstop = 2,
tabstop = 2,
updatetime = 100,
},
}

View file

@ -1,4 +0,0 @@
return {
{ "goolord/alpha-nvim", enabled = false },
{ "rebelot/heirline.nvim", enabled = false },
}

View file

@ -1,23 +0,0 @@
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = {
options = {
component_separators = '',
icons_enabled = true,
section_separators = '',
theme = "powerline",
},
sections = {
lualine_a = { "mode" },
lualine_b = { { "filename", file_status = true, path = 1 } },
lualine_c = { { "branch", icon = "" } },
lualine_x = { "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
tabline = {
lualine_a = { "buffers" },
},
},
}

View file

@ -1,3 +0,0 @@
return {
"tanvirtin/monokai.nvim",
}

View file

@ -1,24 +0,0 @@
return {
"nvim-neo-tree/neo-tree.nvim",
opts = {
close_if_last_window = false,
sort_case_insensitive = true,
window = {
position = "left",
auto_expand_width = true,
mappings = {
["<bs>"] = "close_node",
["s"] = "open_split",
["v"] = "open_vsplit",
},
},
nesting_rules = {},
filesystem = {
filtered_items = {
visible = true,
hide_dotfiles = true,
hide_gitignored = true,
},
},
}
}

View file

@ -1,6 +0,0 @@
return {
"rcarriga/nvim-notify",
opts = {
background_colour = "#000000",
},
}

View file

@ -1,16 +0,0 @@
return {
"nvim-treesitter/nvim-treesitter",
version = "0.9.2",
commit = false,
opts = {
ensure_installed = {
"bash",
"markdown",
"markdown_inline",
"python",
"terraform",
"vim",
"yaml",
},
},
}

View file

@ -1,8 +0,0 @@
return {
{ "johnfrankmorgan/whitespace.nvim",
event = "User AstroFile",
opts = {
highlight = 'SpellBad',
},
},
}

View file

@ -1,23 +0,0 @@
gui:
language: 'auto' # one of 'auto' | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
timeFormat: '2006-01-02' # https://pkg.go.dev/time#Time.Format
shortTimeFormat: '3:04PM'
theme:
selectedLineBgColor:
- reverse
commitLength:
show: true
mouseEvents: false
showFileTree: false # for rendering changes files in a tree format
showListFooter: true # for seeing the '5 of 20' message in list panels
showRandomTip: false
showCommandLog: false
nerdFontsVersion: "3" # nerd fonts version to use ("2" or "3"); empty means don't show nerd font icons
git:
commit:
signOff: true
mainBranches: [master]
autoFetch: false
autoRefresh: false
disableStartupPopups: true
notARepository: 'skip' # one of: 'prompt' | 'create' | 'skip' | 'quit'

View file

@ -1,175 +0,0 @@
-- disable netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- install Lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- define plugins
require("lazy").setup({
"jdhao/whitespace.nvim",
"lewis6991/gitsigns.nvim",
"lukas-reineke/indent-blankline.nvim",
"numToStr/Comment.nvim",
"NvChad/nvim-colorizer.lua",
"nvim-lualine/lualine.nvim",
"nvim-treesitter/nvim-treesitter",
"tanvirtin/monokai.nvim",
{ "nvim-telescope/telescope.nvim",
dependencies = { 'nvim-lua/plenary.nvim' }
},
{ "nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim"
},
},
{
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup({
})
end,
},
})
-- start & setup plugins
-- colorscheme has to be first
require("monokai").setup()
require("gitsigns").setup({
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
},
})
require("indent_blankline").setup()
require("Comment").setup()
require("colorizer").setup()
require("lualine").setup({
options = {
component_separators = '',
icons_enabled = true,
section_separators = '',
theme = "molokai",
},
sections = {
lualine_a = { "mode" },
lualine_b = { { "filename", file_status = true, path = 1 } },
lualine_c = { "branch" },
lualine_x = { "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
tabline = {
lualine_a = { "buffers" },
},
})
require("nvim-treesitter.configs").setup({
build = ":TSUpdate",
ensure_installed = { "bash", "python", "terraform", "vim", "yaml" },
highlight = {
enable = true,
use_languagetree = true,
},
})
require("neo-tree").setup({
close_if_last_window = false,
sort_case_insensitive = true,
window = {
position = "left",
auto_expand_width = true,
-- width = 100,
mappings = {
["s"] = "open_split",
["v"] = "open_vsplit",
},
},
nesting_rules = {},
filesystem = {
filtered_items = {
visible = true,
hide_dotfiles = false,
hide_gitignored = true,
},
},
})
-- modify colorcheme
vim.api.nvim_set_hl(0, "ColorColumn", { bg = "#770000" })
vim.api.nvim_set_hl(0, "DiffChange", { bg = NONE, fg = "#e7c547" })
vim.api.nvim_set_hl(0, "DiffText", { bg = NONE, fg = "#ff8700" })
vim.api.nvim_set_hl(0, "LineNr", { bg = NONE, fg = "#465457" })
vim.api.nvim_set_hl(0, "NonText", { bg = NONE })
vim.api.nvim_set_hl(0, "Normal", { bg = NONE })
vim.api.nvim_set_hl(0, "SignColumn", { bg = NONE })
vim.api.nvim_set_hl(0, "SpellBad", { bg = "#770000", fg = "#ffffff" })
vim.api.nvim_set_hl(0, "Visual", { bg = "#005577", fg = "#ffffff" })
-- global options
vim.opt.list = true
vim.opt.cursorline = true
vim.opt.expandtab = true
vim.opt.gdefault = true
vim.opt.hlsearch = false
vim.opt.ignorecase = true
vim.opt.number = true
vim.opt.shiftround = true
vim.opt.showmode = false
vim.opt.smartcase = true
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.termguicolors = true
vim.opt.writebackup = false
vim.opt.clipboard = ""
vim.opt.mouse = ""
vim.opt.tabstop = 2
vim.opt.scrolloff = 5
vim.opt.updatetime = 100
vim.opt.shiftwidth = 2
vim.opt.showtabline = 2
vim.opt.softtabstop = 2
-- configure mappings
vim.g.mapleader = " "
vim.keymap.set("i", "<C-a>", "<esc>I", { silent = true })
vim.keymap.set("i", "<C-e>", "<esc>A", { silent = true })
vim.keymap.set("n", "<esc><cr>", "<esc><cmd>wq!<cr>", { silent = true })
vim.keymap.set("n", "<leader>/", "<esc><cmd>lua require('Comment.api').toggle.linewise.count(vim.v.count > 0 and vim.v.count or 1)<cr>", { silent = true, desc = "toggle comment" })
vim.keymap.set("n", "<leader>c", '<cmd>execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")<cr>', { silent = true, desc = "toggle column" })
vim.keymap.set("n", "<leader>fb", require("telescope.builtin").buffers, { desc = "find buffer" })
vim.keymap.set("n", "<leader>ff", require("telescope.builtin").find_files, { desc = "find file" })
vim.keymap.set("n", "<leader>fg", require("telescope.builtin").live_grep, { desc = "find text" })
vim.keymap.set("n", "<leader>h", "<cmd>set hlsearch!<cr>", { silent = true, desc = "toggle hlsearch" })
vim.keymap.set("n", "<leader>j", "<cmd>bprevious<cr>", { silent = true, desc = "previous buffer" })
vim.keymap.set("n", "<leader>k", "<cmd>bnext<cr>", { silent = true, desc = "next buffer" })
vim.keymap.set("n", "<leader>n", "<cmd>set nonumber!<cr><cmd>Gitsigns toggle_signs<cr><cmd>IndentBlanklineToggle<cr>", { silent = true, desc = "toggle decorations" })
vim.keymap.set("n", "<leader>s", "<cmd>set spell!<cr>", { silent = true, desc = "toggle spell" })
vim.keymap.set("n", "<leader>t", "<cmd>Neotree toggle<cr>", { silent = true, desc = "toggle tree" })
vim.keymap.set("n", "<leader>x", "<cmd>bd<cr>", { silent = true, desc = "close buffer" })
vim.keymap.set("n", "<tab>", "<C-w>w", { silent = true })
vim.keymap.set("v", "<leader>/", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", { silent = true, desc = "toggle comment" })
-- autocmd
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = {"*.gotmpl"},
callback = function() vim.bo.filetype = "yaml" end,
})

View file

@ -1,110 +0,0 @@
call plug#begin('$XDG_DATA_HOME/nvim/plugins')
Plug 'kamykn/skyknight'
Plug 'NvChad/nvim-colorizer.lua'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-commentary'
Plug 'itchyny/lightline.vim'
Plug 'itchyny/vim-gitbranch'
Plug 'airblade/vim-gitgutter'
Plug 'hashivim/vim-terraform'
Plug 'bitc/vim-bad-whitespace'
call plug#end()
lua require 'colorizer'.setup()
set number
set gdefault
set expandtab
set smartcase
set splitbelow
set splitright
set ignorecase
set nohlsearch
set noshowmode
set shiftround
set cursorline
set nowritebackup
set mouse=
set spelllang=en_us,pl
set tabstop=2
set scrolloff=5
set shortmess-=S
set matchpairs+=(:),{:},[:],<:>,':',":"
set updatetime=100
set shiftwidth=2
set showtabline=0
set softtabstop=2
nmap <tab> <C-w>w
nmap <Esc><CR> :wq!<CR>
nmap <C-p> :Files<CR>
nmap <C-a> :Files ~<CR>
map <leader>b <Esc>:set cc=80,120<CR>
map <leader>nb <Esc>:set cc=0<CR>
map <leader>n <Esc>:set nonumber!<CR>:GitGutterSignsToggle<CR>
map <leader>p <Esc>:set paste!<CR>
map <leader>s <Esc>:set spell!<CR>
set bg=dark
set termguicolors
colorscheme skyknight
hi Comment gui=italic
hi Normal guibg=NONE
hi BadWhitespace guibg=#770000
hi ColorColumn guibg=#770000
hi DiffChange guibg=#465457
hi DiffText guifg=#ff8700 guibg=#465457
hi FoldColumn guifg=#465457 guibg=#272822
hi GitGutterChange guifg=#bbbb00 guibg=#272822
hi LineNr guifg=#465457 guibg=#272822
hi NonText guifg=#465457 guibg=NONE
hi SignColumn guifg=#465457 guibg=#272822
hi Visual guibg=#005577
hi SpellBad guibg=#770000
let $FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/config/fd'
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, {'options': ['-e', '--layout=reverse', '--preview', 'bat --color=always --style=plain --theme=Monokai\ Extended\ Bright {}']}, <bang>0)
command! -bang -nargs=? -complete=dir Colors
\ call fzf#vim#colors({'options': ['-e', '--layout=reverse', '--preview', '']}, <bang>0)
let g:vim_json_conceal=0
let g:markdown_syntax_conceal=0
let g:gitgutter_sign_modified = '~'
let g:Hexokinase_highlighters = [ 'backgroundfull' ]
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'gitbranch', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'filetype' ] ]
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly',
\ 'filename': 'LightLineFilename',
\ 'gitbranch': 'gitbranch#name'
\ }
\ }
function! LightLineReadonly()
return &readonly && &filetype !=# 'help' ? '' : ''
endfunction
function! LightLineFilename()
let root = fnamemodify(get(b:, 'gitbranch_path'), ':h:h')
let path = expand('%:p')
if path[:len(root)-1] ==# root
return path[len(root)+1:]
endif
return expand('%')
endfunction
if filereadable(glob('~/.local/config/init.vim'))
source ~/.local/config/init.vim
endif

View file

@ -1,3 +0,0 @@
# Example_config
This can be used as an example custom config for NvChad. Do check the https://github.com/NvChad/nvcommunity

View file

@ -1,23 +0,0 @@
--@type ChadrcConfig
local M = {}
-- Path to overriding theme and highlights files
local highlights = require "custom.highlights"
M.ui = {
theme = "monekai",
hl_override = highlights.override,
hl_add = highlights.add,
statusline = {
theme = "vscode_colored",
}
}
M.plugins = "custom.plugins"
-- check core.mappings for table structure
M.mappings = require "custom.mappings"
return M

View file

@ -1,16 +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 = {}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
-- lspconfig.pyright.setup { blabla}

View file

@ -1,21 +0,0 @@
local null_ls = require "null-ls"
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,
}

View file

@ -1,41 +0,0 @@
local M = {}
M.treesitter = {
ensure_installed = {
"bash",
"lua",
"markdown",
"markdown_inline",
"python",
"terraform",
"vim",
},
indent = {
enable = true,
-- disable = {
-- "python"
-- },
},
}
-- M.mason = {
-- ensure_installed = {},
-- }
-- git support in nvimtree
M.nvimtree = {
git = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
},
},
},
}
return M

View file

@ -1,23 +0,0 @@
-- To find any highlight groups: "<cmd> Telescope highlights"
-- Each highlight group can take a table with variables fg, bg, bold, italic, etc
-- base30 variable names can also be used as colors
local M = {}
---@type Base46HLGroupsList
M.override = {
ColorColumn = { bg = "#770000" },
Comment = { italic = true, },
DiffChange = { bg = "NONE", fg = "#e7c547" },
DiffText = { bg = "NONE", fg = "#ff8700" },
FoldColumn = { bg = "NONE" },
NormalFloat = { bg = "NONE" },
NonText = { bg = "NONE" },
Normal = { bg = "NONE" },
SignColumn = { bg = "NONE" },
SpellBad = { bg = "#770000", fg = "#ffffff" },
TelescopeNormal = { bg = "NONE" },
Visual = { bg = "#0094d8", fg = "#ffffff" },
}
return M

View file

@ -1,26 +0,0 @@
local autocmd = vim.api.nvim_create_autocmd
local opt = vim.opt
autocmd("BufRead", {
pattern = "*.gotmpl",
command = "set filetype=yaml",
})
autocmd("BufNewFile", {
pattern = "*.gotmpl",
command = "set filetype=yaml",
})
opt.gdefault = true
opt.hlsearch = false
opt.shiftround = true
opt.relativenumber = false
opt.wrap = true
opt.whichwrap = ''
opt.writebackup = false
opt.clipboard = ""
opt.foldcolumn = "0"
opt.mouse = ""
-- opt.laststatus = 2
-- opt.mouse = ""
-- opt.scrolloff = 5

View file

@ -1,30 +0,0 @@
local M = {}
M.disabled = {
n = {
["<leader>m"] = "",
}
}
M.general = {
i = {
["<C-a>"] = { "<esc>I" },
["<C-e>"] = { "<esc>A" },
},
n = {
["<esc><cr>"] = { "<esc><cmd>wq!<cr>", "Save and Exit" },
["<leader>m"] = { '<cmd>execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")<cr>', "Toggle Column" },
["<leader>h"] = { "<cmd>set hlsearch!<cr>", "Toggle hlsearch" },
["<leader>j"] = { "<cmd>bprevious<cr>", "Buffer Previous" },
["<leader>k"] = { "<cmd>bnext<cr>", "Buffer Next" },
["<leader>n"] = { '<cmd>set number!<cr><cmd>IndentBlanklineToggle<cr><cmd>execute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")<cr>', "Toggle Decorations" },
["<leader>w"] = { "<cmd>lua require('whitespace-nvim').trim()<cr>", "Trim Trailing Whitespaces" },
["<leader>x"] = { "<cmd>bd<cr>", "Buffer Close" },
["<tab>"] = { "<C-w>w", },
},
v = {
[">"] = { ">gv", "indent"},
},
}
return M

View file

@ -1,65 +0,0 @@
local overrides = require("custom.configs.overrides")
---@type NvPluginSpec[]
local plugins = {
-- Override plugin definition options
{
"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
},
-- override plugin configs
{
"williamboman/mason.nvim",
opts = overrides.mason
},
{
"nvim-treesitter/nvim-treesitter",
opts = overrides.treesitter,
},
{
"nvim-tree/nvim-tree.lua",
opts = overrides.nvimtree,
},
-- Install a plugin
{
"max397574/better-escape.nvim",
event = "InsertEnter",
config = function()
require("better_escape").setup()
end,
},
-- To make a plugin not be loaded
-- {
-- "NvChad/nvim-colorizer.lua",
-- enabled = false
-- },
-- All NvChad plugins are lazy-loaded by default
-- For a plugin to be loaded, you will need to set either `ft`, `cmd`, `keys`, `event`, or set `lazy = false`
-- If you want a plugin to load on startup, add `lazy = false` to a plugin spec, for example
-- {
-- "mg979/vim-visual-multi",
-- lazy = false,
-- }
}
return plugins

View file

@ -1,70 +0,0 @@
add_newline = false
format="""
$python\
$username\
$hostname\
$directory\
$git_branch\
$git_status\
$jobs\
$character
"""
right_format="""
$cmd_duration
"""
[python]
format = '[(${symbol} $virtualenv)]($style) '
style = '15'
symbol = ''
[username]
format = '[$user]($style)'
style_user = 'normal'
style_root = 'bold 196'
show_always = true
[hostname]
format = '([@$hostname]($style))'
style = 'normal'
[directory]
format = '[ ($read_only )]($read_only_style)[$path]($style) '
style = '37'
read_only_style = '37'
read_only = ''
truncation_length = 0
[git_state]
format = '\([$state( $progress_current/$progress_total)]($style)\) '
style = 'bright-black'
[git_branch]
format = '[$symbol$branch]($style)'
style = '246'
symbol = ' '
[git_status]
format = '[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed) ]($style)'
style = 'green'
conflicted = ''
untracked = ''
modified = ''
staged = ''
renamed = ''
deleted = ''
stashed = '≡'
[jobs]
style = '70'
symbol = '⇶'
[character]
success_symbol = '[](76)'
error_symbol = '[](196)'
[cmd_duration]
format = '[$duration]($style)'
style = '220'