From 16c8f8f1c18273fad54d4e37bf6e8de5d414af2c Mon Sep 17 00:00:00 2001 From: weygoldt <88969563+weygoldt@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:29:13 +0200 Subject: [PATCH] moved plugins over --- init.lua | 8 +-- lua/custom/plugins/alpha.lua | 31 ++++++++++ lua/custom/plugins/chatgpt.lua | 31 ++++++++++ lua/custom/plugins/copilot.lua | 3 + lua/custom/plugins/init.lua | 2 + lua/custom/plugins/lualine.lua | 25 ++++++++ lua/custom/plugins/nvim-colorizer.lua | 32 +++++++++++ lua/custom/plugins/nvim-tmux-navigator.lua | 18 ++++++ lua/custom/plugins/nvim-tree.lua | 7 +++ lua/custom/plugins/nvim-web-devicons.lua | 8 +++ lua/custom/plugins/oil.lua | 7 +++ lua/custom/plugins/rose-pine.lua | 9 +++ lua/custom/plugins/transparent.lua | 4 ++ lua/custom/plugins/twilight.lua | 24 ++++++++ lua/custom/plugins/zen-mode.lua | 67 ++++++++++++++++++++++ 15 files changed, 272 insertions(+), 4 deletions(-) create mode 100644 lua/custom/plugins/alpha.lua create mode 100644 lua/custom/plugins/chatgpt.lua create mode 100644 lua/custom/plugins/copilot.lua create mode 100644 lua/custom/plugins/lualine.lua create mode 100644 lua/custom/plugins/nvim-colorizer.lua create mode 100644 lua/custom/plugins/nvim-tmux-navigator.lua create mode 100644 lua/custom/plugins/nvim-tree.lua create mode 100644 lua/custom/plugins/nvim-web-devicons.lua create mode 100644 lua/custom/plugins/oil.lua create mode 100644 lua/custom/plugins/rose-pine.lua create mode 100644 lua/custom/plugins/transparent.lua create mode 100644 lua/custom/plugins/twilight.lua create mode 100644 lua/custom/plugins/zen-mode.lua diff --git a/init.lua b/init.lua index 13c8143d..64752ebd 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -99,10 +99,10 @@ vim.g.have_nerd_font = false -- For more options, you can see `:help option-list` -- Make line numbers default -vim.opt.number = true +-- vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -929,7 +929,7 @@ require('lazy').setup({ -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/custom/plugins/alpha.lua b/lua/custom/plugins/alpha.lua new file mode 100644 index 00000000..81eed88f --- /dev/null +++ b/lua/custom/plugins/alpha.lua @@ -0,0 +1,31 @@ +return { + 'goolord/alpha-nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons', + }, + + config = function() + local alpha = require 'alpha' + local dashboard = require 'alpha.themes.startify' + + dashboard.section.header.val = { + [[ ]], + [[ ]], + [[ ]], + [[ ]], + [[  ]], + [[ ████ ██████ █████ ██ ]], + [[ ███████████ █████  ]], + [[ █████████ ███████████████████ ███ ███████████ ]], + [[ █████████ ███ █████████████ █████ ██████████████ ]], + [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]], + [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]], + [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]], + [[ ]], + [[ ]], + [[ ]], + } + + alpha.setup(dashboard.opts) + end, +} diff --git a/lua/custom/plugins/chatgpt.lua b/lua/custom/plugins/chatgpt.lua new file mode 100644 index 00000000..a1aaeafc --- /dev/null +++ b/lua/custom/plugins/chatgpt.lua @@ -0,0 +1,31 @@ +local setup_chatgpt = function() + require('chatgpt').setup { + openai_params = { + model = 'gpt-4-turbo-preview', + frequency_penalty = 0, + presence_penalty = 0, + max_tokens = 1000, + temperature = 0, + top_p = 1, + n = 1, + }, + openai_edit_params = { + model = 'gpt-4-turbo-preview', + temperature = 0, + top_p = 1, + n = 1, + }, + } +end + +return { + 'jackMort/ChatGPT.nvim', + event = 'VeryLazy', + config = setup_chatgpt, + dependencies = { + 'MunifTanjim/nui.nvim', + 'nvim-lua/plenary.nvim', + 'folke/trouble.nvim', + 'nvim-telescope/telescope.nvim', + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000..1a804873 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,3 @@ +return { + 'github/copilot.vim', +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..1e3c475a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,6 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information +-- +-- Include all files in the current directory return {} diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua new file mode 100644 index 00000000..7f3f489a --- /dev/null +++ b/lua/custom/plugins/lualine.lua @@ -0,0 +1,25 @@ +local config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'rose-pine', + component_separators = { '|', '|' }, + section_separators = { '', '' }, + disabled_filetypes = {}, + }, + tabline = {}, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' }, + }, + } +end + +return { + 'nvim-lualine/lualine.nvim', + config = config, +} diff --git a/lua/custom/plugins/nvim-colorizer.lua b/lua/custom/plugins/nvim-colorizer.lua new file mode 100644 index 00000000..b0ee0b14 --- /dev/null +++ b/lua/custom/plugins/nvim-colorizer.lua @@ -0,0 +1,32 @@ +return { + 'NvChad/nvim-colorizer.lua', + config = function() + require('colorizer').setup { + filetypes = { '*' }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue or blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes for `mode`: foreground, background, virtualtext + mode = 'virtualtext', -- Set the display mode. + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = false, -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { enable = false, parsers = { 'css' } }, -- Enable sass colors + virtualtext = '■', + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = false, + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, + } + end, +} diff --git a/lua/custom/plugins/nvim-tmux-navigator.lua b/lua/custom/plugins/nvim-tmux-navigator.lua new file mode 100644 index 00000000..98e4ce39 --- /dev/null +++ b/lua/custom/plugins/nvim-tmux-navigator.lua @@ -0,0 +1,18 @@ +return { + 'alexghergh/nvim-tmux-navigation', + lazy = false, + config = function() + local nvim_tmux_nav = require 'nvim-tmux-navigation' + + nvim_tmux_nav.setup { + disable_when_zoomed = true, -- defaults to false + } + + vim.keymap.set('n', '', nvim_tmux_nav.NvimTmuxNavigateLeft) + vim.keymap.set('n', '', nvim_tmux_nav.NvimTmuxNavigateDown) + vim.keymap.set('n', '', nvim_tmux_nav.NvimTmuxNavigateUp) + vim.keymap.set('n', '', nvim_tmux_nav.NvimTmuxNavigateRight) + vim.keymap.set('n', '', nvim_tmux_nav.NvimTmuxNavigateLastActive) + vim.keymap.set('n', '', nvim_tmux_nav.NvimTmuxNavigateNext) + end, +} diff --git a/lua/custom/plugins/nvim-tree.lua b/lua/custom/plugins/nvim-tree.lua new file mode 100644 index 00000000..eb503623 --- /dev/null +++ b/lua/custom/plugins/nvim-tree.lua @@ -0,0 +1,7 @@ +return { + 'nvim-tree/nvim-tree.lua', + config = function() + require('nvim-tree').setup() + vim.keymap.set('n', 'e', ':NvimTreeFindFileToggle', { noremap = true, desc = 'Toggle file [e]xplorer' }) + end, +} diff --git a/lua/custom/plugins/nvim-web-devicons.lua b/lua/custom/plugins/nvim-web-devicons.lua new file mode 100644 index 00000000..9cce9a2f --- /dev/null +++ b/lua/custom/plugins/nvim-web-devicons.lua @@ -0,0 +1,8 @@ +return { + 'nvim-tree/nvim-web-devicons', + config = function() + require('nvim-web-devicons').setup { + default = true, + } + end, +} diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 00000000..f91d7154 --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,7 @@ +return { + 'stevearc/oil.nvim', + config = function() + require('oil').setup() + vim.keymap.set('n', '-', 'Oil', { noremap = true, silent = true, desc = 'Toggle Oil' }) + end, +} diff --git a/lua/custom/plugins/rose-pine.lua b/lua/custom/plugins/rose-pine.lua new file mode 100644 index 00000000..7fdebda7 --- /dev/null +++ b/lua/custom/plugins/rose-pine.lua @@ -0,0 +1,9 @@ +return { + -- 'weygoldt/rose-pine-neovim', + 'rose-pine/neovim', + name = 'rose-pine', + priority = 100, + config = function() + vim.cmd.colorscheme 'rose-pine' + end, +} diff --git a/lua/custom/plugins/transparent.lua b/lua/custom/plugins/transparent.lua new file mode 100644 index 00000000..9c241e56 --- /dev/null +++ b/lua/custom/plugins/transparent.lua @@ -0,0 +1,4 @@ +return { + 'xiyaowong/transparent.nvim', + lazy = false, +} diff --git a/lua/custom/plugins/twilight.lua b/lua/custom/plugins/twilight.lua new file mode 100644 index 00000000..79c8057c --- /dev/null +++ b/lua/custom/plugins/twilight.lua @@ -0,0 +1,24 @@ +return { + 'folke/twilight.nvim', + opts = { + dimming = { + alpha = 0.25, -- amount of dimming + -- we try to get the foreground from the highlight groups or fallback color + color = { 'Normal', '#ffffff' }, + term_bg = '#000000', -- if guibg=NONE, this will be used to calculate text color + inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer) + }, + context = 10, -- amount of lines we will try to show around the current line + treesitter = true, -- use treesitter when available for the filetype + -- treesitter is used to automatically expand the visible text, + -- but you can further control the types of nodes that should always be fully expanded + expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types + 'function', + 'method', + 'table', + 'if_statement', + 'paragraph', + }, + exclude = {}, -- exclude these filetypes + }, +} diff --git a/lua/custom/plugins/zen-mode.lua b/lua/custom/plugins/zen-mode.lua new file mode 100644 index 00000000..c05a461a --- /dev/null +++ b/lua/custom/plugins/zen-mode.lua @@ -0,0 +1,67 @@ +return { + 'folke/zen-mode.nvim', + opts = { + window = { + backdrop = 1, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal + -- height and width can be: + -- * an absolute number of cells when > 1 + -- * a percentage of the width / height of the editor when <= 1 + -- * a function that returns the width or the height + width = 85, -- width of the Zen window + height = 0.9, -- height of the Zen window + -- by default, no options are changed for the Zen window + -- uncomment any of the options below, or add other vim.wo options you want to apply + options = { + -- signcolumn = "no", -- disable signcolumn + -- number = false, -- disable number column + -- relativenumber = false, -- disable relative numbers + -- cursorline = false, -- disable cursorline + -- cursorcolumn = false, -- disable cursor column + -- foldcolumn = "0", -- disable fold column + -- list = false, -- disable whitespace characters + }, + }, + plugins = { + -- disable some global vim options (vim.o...) + -- comment the lines to not apply the options + options = { + enabled = true, + ruler = false, -- disables the ruler text in the cmd line area + showcmd = false, -- disables the command in the last line of the screen + -- you may turn on/off statusline in zen mode by setting 'laststatus' + -- statusline will be shown only if 'laststatus' == 3 + laststatus = 0, -- turn off the statusline in zen mode + }, + twilight = { enabled = false }, -- enable to start Twilight when zen mode opens + gitsigns = { enabled = false }, -- disables git signs + tmux = { enabled = false }, -- disables the tmux statusline + -- this will change the font size on kitty when in zen mode + -- to make this work, you need to set the following kitty options: + -- - allow_remote_control socket-only + -- - listen_on unix:/tmp/kitty + kitty = { + enabled = false, + font = '+4', -- font size increment + }, + -- this will change the font size on alacritty when in zen mode + -- requires Alacritty Version 0.10.0 or higher + -- uses `alacritty msg` subcommand to change font size + alacritty = { + enabled = false, + font = '14', -- font size + }, + -- this will change the font size on wezterm when in zen mode + -- See alse also the Plugins/Wezterm section in this projects README + wezterm = { + enabled = false, + -- can be either an absolute font size or the number of incremental steps + font = '+4', -- (10% increase per step) + }, + }, + + -- callback where you can add custom code when the Zen window opens + on_open = function(win) end, + -- callback where you can add custom code when the Zen window closes + on_close = function() end, + }, +}