diff --git a/nvim/init.lua b/_unused/neovim/init.lua similarity index 100% rename from nvim/init.lua rename to _unused/neovim/init.lua diff --git a/_unused/init.vim b/_unused/neovim/init.vim similarity index 100% rename from _unused/init.vim rename to _unused/neovim/init.vim diff --git a/astronvim/lua/user/highlights/init.lua b/astronvim/lua/user/highlights/init.lua new file mode 100644 index 0000000..cc5bd7e --- /dev/null +++ b/astronvim/lua/user/highlights/init.lua @@ -0,0 +1,12 @@ +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" }, + Visual = { bg = "#005577", fg = "#ffffff" }, +} diff --git a/astronvim/lua/user/init.lua b/astronvim/lua/user/init.lua new file mode 100644 index 0000000..92697e4 --- /dev/null +++ b/astronvim/lua/user/init.lua @@ -0,0 +1,7 @@ +return { + colorscheme = "monokai", + vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + pattern = {"*.gotmpl"}, + callback = function() vim.bo.filetype = "yaml" end, + }), +} diff --git a/astronvim/lua/user/mappings.lua b/astronvim/lua/user/mappings.lua new file mode 100644 index 0000000..915e989 --- /dev/null +++ b/astronvim/lua/user/mappings.lua @@ -0,0 +1,16 @@ +return { + i = { + [""] = { "I" }, + [""] = { "A" }, + }, + n = { + [""] = { "wq!", silent = true }, + ["c"] = { 'execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")', silent = true, desc = "toggle column" }, + ["h"] = { "set hlsearch!", silent = true, desc = "toggle hlsearch" }, + ["j"] = { "bprevious", silent = true, desc = "previous buffer" }, + ["k"] = { "bnext", silent = true, desc = "next buffer" }, + ["n"] = { 'set number!IndentBlanklineToggleexecute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")', silent = true, desc = "toggle decorations" }, + ["x"] = { "bd", silent = true, desc = "close buffer" }, + [""] = { "w", silent = true }, + }, +} diff --git a/astronvim/lua/user/options.lua b/astronvim/lua/user/options.lua new file mode 100644 index 0000000..94913eb --- /dev/null +++ b/astronvim/lua/user/options.lua @@ -0,0 +1,27 @@ +return { + opt = { + 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, + writebackup = false, + clipboard = "", + foldcolumn = "0", + mouse = "", + scrolloff = 5, + shiftwidth = 2, + softtabstop = 2, + tabstop = 2, + updatetime = 100, + laststatus = 2, + }, +} diff --git a/astronvim/lua/user/plugins/indent.lua b/astronvim/lua/user/plugins/indent.lua new file mode 100644 index 0000000..6a6a19b --- /dev/null +++ b/astronvim/lua/user/plugins/indent.lua @@ -0,0 +1,6 @@ +return { + "lukas-reineke/indent-blankline.nvim", + opts = { + show_current_context = false, + } +} diff --git a/astronvim/lua/user/plugins/init.lua b/astronvim/lua/user/plugins/init.lua new file mode 100644 index 0000000..4e7697b --- /dev/null +++ b/astronvim/lua/user/plugins/init.lua @@ -0,0 +1,4 @@ +return { + { "goolord/alpha-nvim", enabled = false }, + { "rebelot/heirline.nvim", enabled = false }, +} diff --git a/astronvim/lua/user/plugins/lualine.lua b/astronvim/lua/user/plugins/lualine.lua new file mode 100644 index 0000000..b127284 --- /dev/null +++ b/astronvim/lua/user/plugins/lualine.lua @@ -0,0 +1,23 @@ +return { + "nvim-lualine/lualine.nvim", + event = "User AstroFile", + opts = { + 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" }, + }, + }, +} diff --git a/astronvim/lua/user/plugins/monokai.lua b/astronvim/lua/user/plugins/monokai.lua new file mode 100644 index 0000000..577cbec --- /dev/null +++ b/astronvim/lua/user/plugins/monokai.lua @@ -0,0 +1,3 @@ +return { + "tanvirtin/monokai.nvim", +} diff --git a/astronvim/lua/user/plugins/neotree.lua b/astronvim/lua/user/plugins/neotree.lua new file mode 100644 index 0000000..3af0e3a --- /dev/null +++ b/astronvim/lua/user/plugins/neotree.lua @@ -0,0 +1,24 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + opts = { + 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, + }, + }, + } +} diff --git a/astronvim/lua/user/plugins/notify.lua b/astronvim/lua/user/plugins/notify.lua new file mode 100644 index 0000000..828aaf1 --- /dev/null +++ b/astronvim/lua/user/plugins/notify.lua @@ -0,0 +1,6 @@ +return { + "rcarriga/nvim-notify", + opts = { + background_colour = "#000000", + }, +} diff --git a/astronvim/lua/user/plugins/treesitter.lua b/astronvim/lua/user/plugins/treesitter.lua new file mode 100644 index 0000000..6824f56 --- /dev/null +++ b/astronvim/lua/user/plugins/treesitter.lua @@ -0,0 +1,12 @@ +return { + "nvim-treesitter/nvim-treesitter", + opts = { + auto_install = true, + ensure_installed = { + "bash", + "python", + "terraform", + "vim", + }, + }, +} diff --git a/astronvim/lua/user/plugins/whitespace.lua b/astronvim/lua/user/plugins/whitespace.lua new file mode 100644 index 0000000..ed8d23b --- /dev/null +++ b/astronvim/lua/user/plugins/whitespace.lua @@ -0,0 +1,5 @@ +return { + { "johnfrankmorgan/whitespace.nvim", + event = "User AstroFile", + }, +} diff --git a/install.sh b/install.sh index 9b487c2..eb7a4d9 100644 --- a/install.sh +++ b/install.sh @@ -18,11 +18,15 @@ rm -rf $XDG_DATA_HOME/repos/dotfiles git clone --recurse https://git.insomniac.pl/ftpd/dotfiles $XDG_DATA_HOME/repos/dotfiles # configs -for i in fd htop nvim tmux; do +for i in fd htop astronvim tmux; do rm -rf ~/.config/${i} ln -sf $XDG_DATA_HOME/repos/dotfiles/${i} ~/.config/ done +# astronvim +rm -rf ~/.config/nvim +git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim + ## zsh ### modules mkdir -p $XDG_DATA_HOME/repos/zsh_modules