From 5f864170166733d077345593bf838de002500967 Mon Sep 17 00:00:00 2001 From: Tristan Jahnke Date: Mon, 5 Jun 2023 13:11:52 -0500 Subject: [PATCH] correct dir layout --- nvim/after/plugin/catppuccin.lua | 46 +++++++++++++++++++ nvim/{lua/config => after/plugin}/copilot.lua | 0 .../{lua/config => after/plugin}/fugitive.lua | 0 nvim/{lua/config => after/plugin}/harpoon.lua | 0 nvim/{lua/config => after/plugin}/lsp.lua | 0 nvim/{lua/config => after/plugin}/mason.lua | 0 .../config => after/plugin}/telescope.lua | 0 .../plugin}/treesitter-context.lua | 0 .../plugin}/treesitter-playground.lua | 0 .../config => after/plugin}/treesitter.lua | 0 .../{lua/config => after/plugin}/undotree.lua | 0 nvim/init.lua | 4 +- nvim/lua/RemoteRabbit/init.lua | 34 ++++++++++++++ nvim/lua/{ => RemoteRabbit}/mappings.lua | 0 nvim/lua/{ => RemoteRabbit}/options.lua | 0 nvim/lua/{ => RemoteRabbit}/plugins.lua | 28 +++-------- nvim/lua/config/catppuccin.lua | 1 - nvim/lua/config/startup.lua | 31 ------------- 18 files changed, 88 insertions(+), 56 deletions(-) create mode 100644 nvim/after/plugin/catppuccin.lua rename nvim/{lua/config => after/plugin}/copilot.lua (100%) rename nvim/{lua/config => after/plugin}/fugitive.lua (100%) rename nvim/{lua/config => after/plugin}/harpoon.lua (100%) rename nvim/{lua/config => after/plugin}/lsp.lua (100%) rename nvim/{lua/config => after/plugin}/mason.lua (100%) rename nvim/{lua/config => after/plugin}/telescope.lua (100%) rename nvim/{lua/config => after/plugin}/treesitter-context.lua (100%) rename nvim/{lua/config => after/plugin}/treesitter-playground.lua (100%) rename nvim/{lua/config => after/plugin}/treesitter.lua (100%) rename nvim/{lua/config => after/plugin}/undotree.lua (100%) create mode 100644 nvim/lua/RemoteRabbit/init.lua rename nvim/lua/{ => RemoteRabbit}/mappings.lua (100%) rename nvim/lua/{ => RemoteRabbit}/options.lua (100%) rename nvim/lua/{ => RemoteRabbit}/plugins.lua (72%) delete mode 100644 nvim/lua/config/catppuccin.lua delete mode 100644 nvim/lua/config/startup.lua diff --git a/nvim/after/plugin/catppuccin.lua b/nvim/after/plugin/catppuccin.lua new file mode 100644 index 0000000..3891f0b --- /dev/null +++ b/nvim/after/plugin/catppuccin.lua @@ -0,0 +1,46 @@ +require("catppuccin").setup({ + flavour = "mocha", -- latte, frappe, macchiato, mocha + background = { -- :h background + light = "latte", + dark = "mocha", + }, + transparent_background = false, -- disables setting the background color. + show_end_of_buffer = false, -- shows the '~' characters after the end of buffers + term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`) + dim_inactive = { + enabled = false, -- dims the background color of inactive window + shade = "dark", + percentage = 0.15, -- percentage of the shade to apply to the inactive window + }, + no_italic = false, -- Force no italic + no_bold = false, -- Force no bold + no_underline = false, -- Force no underline + styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): + comments = { "italic" }, -- Change the style of comments + conditionals = { "italic" }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + }, + color_overrides = {}, + custom_highlights = {}, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + telescope = true, + notify = false, + mini = false, + -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) + }, +}) + +-- setup must be called before loading +vim.cmd.colorscheme "catppuccin" diff --git a/nvim/lua/config/copilot.lua b/nvim/after/plugin/copilot.lua similarity index 100% rename from nvim/lua/config/copilot.lua rename to nvim/after/plugin/copilot.lua diff --git a/nvim/lua/config/fugitive.lua b/nvim/after/plugin/fugitive.lua similarity index 100% rename from nvim/lua/config/fugitive.lua rename to nvim/after/plugin/fugitive.lua diff --git a/nvim/lua/config/harpoon.lua b/nvim/after/plugin/harpoon.lua similarity index 100% rename from nvim/lua/config/harpoon.lua rename to nvim/after/plugin/harpoon.lua diff --git a/nvim/lua/config/lsp.lua b/nvim/after/plugin/lsp.lua similarity index 100% rename from nvim/lua/config/lsp.lua rename to nvim/after/plugin/lsp.lua diff --git a/nvim/lua/config/mason.lua b/nvim/after/plugin/mason.lua similarity index 100% rename from nvim/lua/config/mason.lua rename to nvim/after/plugin/mason.lua diff --git a/nvim/lua/config/telescope.lua b/nvim/after/plugin/telescope.lua similarity index 100% rename from nvim/lua/config/telescope.lua rename to nvim/after/plugin/telescope.lua diff --git a/nvim/lua/config/treesitter-context.lua b/nvim/after/plugin/treesitter-context.lua similarity index 100% rename from nvim/lua/config/treesitter-context.lua rename to nvim/after/plugin/treesitter-context.lua diff --git a/nvim/lua/config/treesitter-playground.lua b/nvim/after/plugin/treesitter-playground.lua similarity index 100% rename from nvim/lua/config/treesitter-playground.lua rename to nvim/after/plugin/treesitter-playground.lua diff --git a/nvim/lua/config/treesitter.lua b/nvim/after/plugin/treesitter.lua similarity index 100% rename from nvim/lua/config/treesitter.lua rename to nvim/after/plugin/treesitter.lua diff --git a/nvim/lua/config/undotree.lua b/nvim/after/plugin/undotree.lua similarity index 100% rename from nvim/lua/config/undotree.lua rename to nvim/after/plugin/undotree.lua diff --git a/nvim/init.lua b/nvim/init.lua index a69a168..356e28d 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,3 +1 @@ -require("options") -require("mappings") -require("plugins") \ No newline at end of file +require("RemoteRabbit") diff --git a/nvim/lua/RemoteRabbit/init.lua b/nvim/lua/RemoteRabbit/init.lua new file mode 100644 index 0000000..fa3dfd2 --- /dev/null +++ b/nvim/lua/RemoteRabbit/init.lua @@ -0,0 +1,34 @@ +require("RemoteRabbit.mappings") +require("RemoteRabbit.options") +require("RemoteRabbit.plugins") + +local augroup = vim.api.nvim_create_augroup +local RemoteRabbitGroup = augroup('RemoteRabbit', {}) + +local autocmd = vim.api.nvim_create_autocmd +local yank_group = augroup('HighlightYank', {}) + +function R(name) + require("plenary.reload").reload_module(name) +end + +autocmd('TextYankPost', { + group = yank_group, + pattern = '*', + callback = function() + vim.highlight.on_yank({ + higroup = 'IncSearch', + timeout = 40, + }) + end, +}) + +autocmd({"BufWritePre"}, { + group = RemoteRabbitGroup, + pattern = "*", + command = [[%s/\s\+$//e]], +}) + +vim.g.netrw_browse_split = 0 +vim.g.netrw_banner = 0 +vim.g.netrw_winsize = 25 diff --git a/nvim/lua/mappings.lua b/nvim/lua/RemoteRabbit/mappings.lua similarity index 100% rename from nvim/lua/mappings.lua rename to nvim/lua/RemoteRabbit/mappings.lua diff --git a/nvim/lua/options.lua b/nvim/lua/RemoteRabbit/options.lua similarity index 100% rename from nvim/lua/options.lua rename to nvim/lua/RemoteRabbit/options.lua diff --git a/nvim/lua/plugins.lua b/nvim/lua/RemoteRabbit/plugins.lua similarity index 72% rename from nvim/lua/plugins.lua rename to nvim/lua/RemoteRabbit/plugins.lua index ea36c31..1b01283 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/RemoteRabbit/plugins.lua @@ -21,10 +21,6 @@ augroup end -- Only required if you have packer configured as `opt` vim.cmd.packadd('packer.nvim') -function get_setup(name) - return string.format("require('config.%s')", name) -end - return require('packer').startup(function(use) -- Packer can manage itself use ('wbthomason/packer.nvim') @@ -33,10 +29,9 @@ return require('packer').startup(function(use) 'nvim-telescope/telescope.nvim', tag = '0.1.0', -- or , branch = '0.1.x', requires = { {'nvim-lua/plenary.nvim'} }, - config = get_setup("telescope") }) - use ({ "catppuccin/nvim", as = "catppuccin", config = get_setup("catppuccin") }) + use ({ "catppuccin/nvim", as = "catppuccin"}) use({ "folke/trouble.nvim", @@ -53,20 +48,18 @@ return require('packer').startup(function(use) local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) ts_update() end, - config = get_setup("treesitter") }) - use({"nvim-treesitter/playground", config = get_setup("treesitter-playground")}) - use({"theprimeagen/harpoon", config = get_setup("harpoon")}) - use({"mbbill/undotree", config = get_setup("undotree")}) - use({"tpope/vim-fugitive", config = get_setup("fugitive")}) - use({"nvim-treesitter/nvim-treesitter-context", config = get_setup("treesitter-context")}) + use({"nvim-treesitter/playground"}) + use({"theprimeagen/harpoon"}) + use({"mbbill/undotree"}) + use({"tpope/vim-fugitive"}) + use({"nvim-treesitter/nvim-treesitter-context"}) -- LSP ------------------------------------------------------------------ use({ 'VonHeikemen/lsp-zero.nvim', branch = 'v2.x', - config = get_setup("lsp"), requires = { -- LSP Support {'neovim/nvim-lspconfig'}, -- Required @@ -92,15 +85,8 @@ return require('packer').startup(function(use) ----------------------------------------------------------------------------- use({'rcarriga/nvim-notify'}) - use({"github/copilot.vim", config = get_setup("copilot")}) + use({"github/copilot.vim"}) - use { - "startup-nvim/startup.nvim", - requires = {"nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim"}, - config = function() - require"startup".setup({theme = 'evil'}) - end - } -- Put this at the end after all plugins if packer_bootstrap then require('packer').sync() diff --git a/nvim/lua/config/catppuccin.lua b/nvim/lua/config/catppuccin.lua deleted file mode 100644 index 77d5ea6..0000000 --- a/nvim/lua/config/catppuccin.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd.colorscheme "catppuccin" diff --git a/nvim/lua/config/startup.lua b/nvim/lua/config/startup.lua deleted file mode 100644 index 0d961ba..0000000 --- a/nvim/lua/config/startup.lua +++ /dev/null @@ -1,31 +0,0 @@ -require"startup".setup({ - section_1 =
-- for the structure of a section see below - section_2 =
-- as much sections as you like - options = { - mapping_keys = true, -- display mapping (e.g. ff) - - -- if < 0 fraction of screen width - -- if > 0 numbers of column - cursor_column = 0.5, - - after = function() -- function that gets executed at the end - - end, - empty_lines_between_mappings = true, -- add an empty line between mapping/commands - disable_statuslines = true, -- disable status-, buffer- and tablines - paddings = {1,2}, -- amount of empty lines before each section (must be equal to amount of sections) - }, - mappings = { - execute_command = "", - open_file = "o", - open_file_split = "", - open_section = "", - open_help = "?", - }, - colors = { - background = "#1f2227", - folded_section = "#56b6c2", -- the color of folded sections - -- this can also be changed with the `StartupFoldedSection` highlight group - }, - parts = {"section_1", "section_2"} -- all sections in order -})