diff --git a/init.lua b/init.lua index 57c9af42..38527250 100644 --- a/init.lua +++ b/init.lua @@ -63,6 +63,7 @@ vim.opt.rtp:prepend(lazypath) -- You can also configure plugins after the setup call, -- as they will be available in your neovim runtime. require('lazy').setup({ + -- NOTE: First, some plugins that don't require any configuration -- Git related plugins @@ -72,6 +73,8 @@ require('lazy').setup({ -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', + require('custom.plugins.inlayhint'), + -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. { @@ -84,7 +87,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -108,7 +111,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -122,21 +125,14 @@ require('lazy').setup({ changedelete = { text = '~' }, }, on_attach = function(bufnr) - vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) - vim.keymap.set('n', 'gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) + vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' }) + vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' }) vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) end, }, }, - { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', - priority = 1000, - config = function() - vim.cmd.colorscheme 'onedark' - end, - }, + require('custom.theme'), { -- Set lualine as statusline @@ -144,10 +140,27 @@ require('lazy').setup({ -- See `:help lualine.txt` opts = { options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', + icons_enabled = true, + theme = 'auto', + section_separators = { left = "", right = "" }, + component_separators = { left = "", right = "" } + }, + -- Custom sections + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'filetype', require('custom.lualine').me }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = {}, + lualine_y = { 'encoding', 'filetype', require('custom.lualine').me }, + lualine_z = { 'location' } }, }, }, @@ -164,7 +177,7 @@ require('lazy').setup({ }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) { 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } }, @@ -272,11 +285,15 @@ vim.api.nvim_create_autocmd('TextYankPost', { -- See `:help telescope` and `:help telescope.setup()` require('telescope').setup { defaults = { + winblend = 50, mappings = { i = { - [''] = false, - [''] = false, + [""] = require('telescope.actions').cycle_history_next, + [""] = require('telescope.actions').cycle_history_prev, + [""] = require('telescope.actions').move_selection_next, + [""] = require('telescope.actions').move_selection_previous, }, + n = { q = require('telescope.actions').close }, }, }, } @@ -306,10 +323,10 @@ vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { de -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' }, + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'php' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) - auto_install = false, + auto_install = true, highlight = { enable = true }, indent = { enable = true }, @@ -477,8 +494,10 @@ cmp.setup { end, }, mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), + -- [''] = cmp.mapping.select_next_item(), + -- [''] = cmp.mapping.select_prev_item(), [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, @@ -513,3 +532,8 @@ cmp.setup { -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et + + +-- Custom stuff + +require('custom.core') diff --git a/lua/custom/colors.lua b/lua/custom/colors.lua new file mode 100644 index 00000000..dd02dbb4 --- /dev/null +++ b/lua/custom/colors.lua @@ -0,0 +1,23 @@ +local colors = {} +function colors.LineNumberColors() + vim.api.nvim_set_hl(0, 'LineNrAbove', { fg='#999966', bold=true }) + vim.api.nvim_set_hl(0, 'LineNr', { fg='white', bold=true }) + vim.api.nvim_set_hl(0, 'LineNrBelow', { fg='#999966', bold=true }) +end + +vim.api.nvim_create_user_command('TransparencyToggle', + function (opts) + vim.cmd('TransparentToggle') + colors.LineNumberColors() + end, + {} +) + +vim.g.transparent_groups = vim.list_extend( + vim.g.transparent_groups or {}, + vim.tbl_map(function(v) + return v.hl_group + end, vim.tbl_values(require('bufferline.config').highlights)) +) + +return colors diff --git a/lua/custom/core.lua b/lua/custom/core.lua new file mode 100644 index 00000000..d9484879 --- /dev/null +++ b/lua/custom/core.lua @@ -0,0 +1,27 @@ +vim.g.transparent_enabled = true +vim.g.transparency = 0.8 +vim.wo.number = true +vim.o.relativenumber = true + +vim.o.wrap = false +vim.o.smartindent = true +vim.o.ruler = true +vim.o.colorcolumn = "80" + +vim.o.shiftround = true +vim.o.expandtab = true +vim.o.smartindent = true +vim.o.tabstop = 4 +vim.o.shiftwidth = 4 +vim.opt.guicursor = 'n-v-c-sm:block' +vim.opt.guifont = 'FiraCode Nerd Font' + +vim.opt.shell = 'bash' +vim.o.shell = 'bash' +vim.opt.shellcmdflag = '-c' +vim.opt.termguicolors = true + +require('custom.colors').LineNumberColors() +-- require('custom.colors').CursorLineColors() +require('custom.keymaps') +require('custom.neovide') diff --git a/lua/custom/keymaps.lua b/lua/custom/keymaps.lua new file mode 100644 index 00000000..26034ca1 --- /dev/null +++ b/lua/custom/keymaps.lua @@ -0,0 +1,88 @@ +-- Custom keymap +-- See `:help vim.keymap.set()` + +-- Cool keymap +vim.keymap.set("i", "jk", "", { desc = "Exit insert mode" }) +vim.keymap.set("i", "jj", "", { desc = "Exit insert mode" }) +vim.keymap.set("v", "p", "pgvy", { desc = "Paste without empty paste register" }) + +-- File operation +vim.keymap.set("n", "w", "w", { desc = "Save the file" }) +vim.keymap.set("n", "q", "bdelete", { desc = "Quit the current buffer" }) +vim.keymap.set("n", "q", "q", { desc = "Quit the window" }) + +-- Lsp stuff +vim.keymap.set("n", "gh", vim.lsp.buf.hover, { desc = "Hover documentation" }) + +-- Split window +vim.keymap.set("n", "=", "split", { desc = "Split the window horizontally" }) +vim.keymap.set("n", "-", "vsplit", { desc = "Split the window vertically" }) + +-- Better window operation + +vim.keymap.set("n", "j", "j", { desc = "Focus buffer below" }) +vim.keymap.set("n", "k", "k", { desc = "Focus buffer above" }) +vim.keymap.set("n", "l", "l", { desc = "Focus buffer left" }) +vim.keymap.set("n", "h", "h", { desc = "Focus buffer right" }) + +vim.keymap.set("n", "", ":resize -2", { desc = "Resize current view to the top" }) +vim.keymap.set("n", "", ":resize +2", { desc = "Resize current view to the bottom" }) +vim.keymap.set("n", "", ":vertical resize -2", { desc = "Resize current view to the left" }) +vim.keymap.set("n", "", ":vertical resize +2", { desc = "Resize current view to the right" }) + +-- Buffer +vim.keymap.set("n", "l", "bnext", { desc = "Next buffer" }) +vim.keymap.set("n", "h", "bnext", { desc = "Previous buffer" }) + +-- Formatting +-- vim.keymap.set("n", "", "gcc", { desc = "Adding comment to the current line" }) +-- vim.keymap.set("v", "", "gcc", { desc = "Adding comment to the current line" }) + +vim.keymap.set("v", "<", "", ">gv", { desc = "Increase indent" }) + +-- vim.keymap.set("n", "j", ":m .+1==", { desc = "" } ) +-- vim.keymap.set("n", "k", ":m .-2==", { desc = "" } ) + +vim.keymap.set("v", "j", ":m .+1==", { desc = "" } ) +vim.keymap.set("v", "k", ":m .-2==", { desc = "" } ) + +-- Nerdtree +vim.keymap.set('n', 'n', 'NERDTreeFocus', { desc = "Nerd tree focus" }) +vim.keymap.set('n', '', 'NERDTree', { desc = "Nerd tree focus" }) +vim.keymap.set('n', '', 'NERDTreeToggle', { desc = "Nerd tree toggle" }) +vim.keymap.set('n', '', 'NERDTreeFind', { desc = "Nerd tree find" }) + +-- Term +vim.keymap.set('n', 't', 'terminal', { desc = "Show terminal" } ) + +vim.keymap.set('n', 't', 'lua require("FTerm").toggle()', { desc = "Toggle Float Terminal" }) +vim.keymap.set('t', 't', 'lua require("FTerm").toggle()', { desc = "Toggle Float Terminal" }) + +vim.keymap.set('t', '', '', { desc = "Exit terminal mode "} ) +vim.keymap.set('t', 'jk', '', { desc = "Exit terminal mode "} ) +vim.keymap.set('t', 'jj', '', { desc = "Exit terminal mode "} ) +vim.keymap.set("t", "q", "bdelete", { desc = "Quit the current buffer" }) + +vim.keymap.set('t', '', 'h', { desc = "" }) +vim.keymap.set('t', '', 'j', { desc = "" }) +vim.keymap.set('t', '', 'k', { desc = "" }) +vim.keymap.set('t', '', 'l', { desc = "" }) + +vim.keymap.set('i', '', 'h', { desc = "" }) +vim.keymap.set('i', '', 'j', { desc = "" }) +vim.keymap.set('i', '', 'k', { desc = "" }) +vim.keymap.set('i', '', 'l', { desc = "" }) + +vim.keymap.set('n', '', 'j', { desc = "" }) +vim.keymap.set('n', '', 'k', { desc = "" }) +vim.keymap.set('n', '', 'l', { desc = "" }) + +-- Code action +vim.keymap.set('n', ',', 'CodeActionMenu') + +-- Oil +vim.keymap.set('n', '-', 'Oil', { desc = "Open Oil" }) + +-- Transparency +vim.keymap.set('n', '=', 'TransparencyToggle', { desc = "Toggle Transparency" }) diff --git a/lua/custom/lualine.lua b/lua/custom/lualine.lua new file mode 100644 index 00000000..98f9957e --- /dev/null +++ b/lua/custom/lualine.lua @@ -0,0 +1,7 @@ +local me_lualine = {} + +function me_lualine.me() + return "UnknownRori" +end + +return me_lualine diff --git a/lua/custom/neovide.lua b/lua/custom/neovide.lua new file mode 100644 index 00000000..f499b283 --- /dev/null +++ b/lua/custom/neovide.lua @@ -0,0 +1,24 @@ +if vim.g.neovide then + vim.g.neovide_scale_factor = 0.9 + vim.api.nvim_create_user_command('FullscreenToggle', + function (opts) + vim.g.neovide_fullscreen = not vim.g.neovide_fullscreen + end, + {} + ) + + -- Helper function for transparency formatting + local alpha = function() + return string.format("%x", math.floor(255 * vim.g.transparency or 0.8)) + end + -- g:neovide_transparency should be 0 if you want to unify transparency of content and title bar. + vim.g.neovide_transparency = 0.8 + vim.g.transparency = 0.8 + vim.g.neovide_background_color = "#0f1117" .. alpha() + + vim.g.neovide_floating_blur_amount_x = 2.0 + vim.g.neovide_floating_blur_amount_y = 2.0 + vim.g.neovide_scroll_animation_length = 0.3 + + vim.g.neovide_cursor_vfx_mode = "railgun" +end diff --git a/lua/custom/plugins/autopairs.lua b/lua/custom/plugins/autopairs.lua new file mode 100644 index 00000000..d271227f --- /dev/null +++ b/lua/custom/plugins/autopairs.lua @@ -0,0 +1,15 @@ +return { + "windwp/nvim-autopairs", + -- Optional dependency + dependencies = { 'hrsh7th/nvim-cmp' }, + config = function() + require("nvim-autopairs").setup {} + -- If you want to automatically add `(` after selecting a function or method + local cmp_autopairs = require('nvim-autopairs.completion.cmp') + local cmp = require('cmp') + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) + end, +} diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua new file mode 100644 index 00000000..922685dd --- /dev/null +++ b/lua/custom/plugins/bufferline.lua @@ -0,0 +1,19 @@ +return { + 'akinsho/bufferline.nvim', + version = "*", + dependencies = 'nvim-tree/nvim-web-devicons', + config = function() + vim.opt.termguicolors = true + require('bufferline').setup({ + options = { + diagnostics = "nvim_lsp", + hover = { + enabled = true, + delay = 200, + reveal = {'close'} + } + } + }) + end, + } + diff --git a/lua/custom/plugins/color_highlight.lua b/lua/custom/plugins/color_highlight.lua new file mode 100644 index 00000000..bbca117f --- /dev/null +++ b/lua/custom/plugins/color_highlight.lua @@ -0,0 +1,6 @@ +return { + 'brenoprata10/nvim-highlight-colors', + config = function () + require('nvim-highlight-colors').setup {} + end, +} diff --git a/lua/custom/plugins/colorpicker.lua b/lua/custom/plugins/colorpicker.lua new file mode 100644 index 00000000..75e9279a --- /dev/null +++ b/lua/custom/plugins/colorpicker.lua @@ -0,0 +1,7 @@ +return { + "max397574/colortils.nvim", + cmd = "Colortils", + config = function() + require("colortils").setup() + end, +} diff --git a/lua/custom/plugins/cursorline.lua b/lua/custom/plugins/cursorline.lua new file mode 100644 index 00000000..1ce783cc --- /dev/null +++ b/lua/custom/plugins/cursorline.lua @@ -0,0 +1,15 @@ +return { + 'yamatsum/nvim-cursorline', + opts = { + cursorline = { + enable = true, + timeout = 0, + number = false, + }, + cursorword = { + enable = true, + min_length = 3, + hl = { underline = true }, + } + } +} diff --git a/lua/custom/plugins/cursorword.lua b/lua/custom/plugins/cursorword.lua new file mode 100644 index 00000000..86797e10 --- /dev/null +++ b/lua/custom/plugins/cursorword.lua @@ -0,0 +1,3 @@ +return { + 'xiyaowong/nvim-cursorword', +} diff --git a/lua/custom/plugins/dashboard.lua b/lua/custom/plugins/dashboard.lua new file mode 100644 index 00000000..12d2bace --- /dev/null +++ b/lua/custom/plugins/dashboard.lua @@ -0,0 +1,62 @@ +return { + "goolord/alpha-nvim", + event = "VimEnter", + dependencies = { {'nvim-tree/nvim-web-devicons'}}, + opts = function() + local dashboard = require("alpha.themes.dashboard") + local logo = [[ + ██████╗ ██████╗ ██████╗ ██╗ + ██╔══██╗██╔═══██╗██╔══██╗██║ + ██████╔╝██║ ██║██████╔╝██║ + ██╔══██╗██║ ██║██╔══██╗██║ + ██║ ██║╚██████╔╝██║ ██║██║ + ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ + ]] + + dashboard.section.header.val = vim.split(logo, "\n") + dashboard.section.buttons.val = { + dashboard.button("f", " " .. " Find file", ":Telescope find_files "), + dashboard.button("n", " " .. " New file", ":ene startinsert "), + dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), + dashboard.button("g", " " .. " Find text", ":Telescope live_grep "), + dashboard.button("c", " " .. " Config", ":e $MYVIMRC "), + dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() ]]), + dashboard.button("l", "󰒲 " .. " Lazy", ":Lazy"), + dashboard.button("q", " " .. " Quit", ":qa"), + } + for _, button in ipairs(dashboard.section.buttons.val) do + button.opts.hl = "AlphaButtons" + button.opts.hl_shortcut = "AlphaShortcut" + end + dashboard.section.header.opts.hl = "AlphaHeader" + dashboard.section.buttons.opts.hl = "AlphaButtons" + dashboard.section.footer.opts.hl = "AlphaFooter" + dashboard.opts.layout[1].val = 8 + return dashboard + end, + config = function(_, dashboard) + -- close Lazy and re-open when the dashboard is ready + if vim.o.filetype == "lazy" then + vim.cmd.close() + vim.api.nvim_create_autocmd("User", { + pattern = "AlphaReady", + callback = function() + require("lazy").show() + end, + }) + end + + require("alpha").setup(dashboard.opts) + + vim.api.nvim_create_autocmd("User", { + pattern = "LazyVimStarted", + callback = function() + local stats = require("lazy").stats() + local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) + dashboard.section.footer.val = "⚡ Rori's Editor loaded " .. stats.count .. " plugins in " .. ms .. "ms" + pcall(vim.cmd.AlphaRedraw) + end, + }) + end, + } + diff --git a/lua/custom/plugins/discord_presence.lua b/lua/custom/plugins/discord_presence.lua new file mode 100644 index 00000000..9dd0712e --- /dev/null +++ b/lua/custom/plugins/discord_presence.lua @@ -0,0 +1,12 @@ +return { + 'andweeb/presence.nvim', + opts = { + editing_text = "🛠️ Editing %s", + file_explorer_text = "📝 Browsing %s", + git_commit_text = "📝 Committing changes", + plugin_manager_text = "📦 Managing plugins", + reading_text = "📝 Reading %s", + workspace_text = "🔨 Working on %s", + line_number_text = "📝 Line %s out of %s", + } +} diff --git a/lua/custom/plugins/fold.lua b/lua/custom/plugins/fold.lua new file mode 100644 index 00000000..07f75222 --- /dev/null +++ b/lua/custom/plugins/fold.lua @@ -0,0 +1,16 @@ +return { + 'anuvyklack/pretty-fold.nvim', + config = function() + require('pretty-fold').ft_setup('lua', { + matchup_patterns = { + { '^%s*do$', 'end' }, -- do ... end blocks + { '^%s*if', 'end' }, -- if ... end + { '^%s*for', 'end' }, -- for + { 'function%s*%(', 'end' }, -- 'function( or 'function ('' + { '{', '}' }, + { '%(', ')' }, -- % to escape lua pattern char + { '%[', ']' }, -- % to escape lua pattern char + }, + }) + end, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..3e23a841 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,51 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} + +function load_plugin (name) + return require('custom.plugins.' .. name) +end + +return { + 'nvim-tree/nvim-web-devicons', + 'preservim/nerdtree', + + 'hrsh7th/nvim-cmp', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'saadparwaiz1/cmp_luasnip', + 'hrsh7th/cmp-nvim-lua', + 'jose-elias-alvarez/null-ls.nvim', + 'simrat39/rust-tools.nvim', + -- 'jose-elias-alvarez/nvim-lsp-ts-utils', + { + 'p00f/clangd_extensions.nvim', + lazy = false, + }, + + 'L3MON4D3/LuaSnip', + 'rafamadriz/friendly-snippets', + + 'RRethy/vim-illuminate', + 'ray-x/lsp_signature.nvim', + 'nvim-treesitter/nvim-treesitter-context', + + + load_plugin('discord_presence'), + + load_plugin('oil'), + load_plugin('bufferline'), + load_plugin('terminal'), + load_plugin('autopairs'), + load_plugin('dashboard'), + load_plugin('todocomment'), + load_plugin('notify'), + load_plugin('cursorword'), + load_plugin('cursorline'), + load_plugin('transparent'), + load_plugin('fold'), + load_plugin('colorpicker'), + load_plugin('color_highlight'), +} + diff --git a/lua/custom/plugins/inlayhint.lua b/lua/custom/plugins/inlayhint.lua new file mode 100644 index 00000000..a866e6fb --- /dev/null +++ b/lua/custom/plugins/inlayhint.lua @@ -0,0 +1,20 @@ +return { + 'lvimuser/lsp-inlayhints.nvim', + lazy = false, + config = function() + require('lsp-inlayhints.init').setup(); + vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) + vim.api.nvim_create_autocmd("LspAttach", { + group = "LspAttach_inlayhints", + callback = function(args) + if not (args.data and args.data.client_id) then + return + end + + local bufnr = args.buf + local client = vim.lsp.get_client_by_id(args.data.client_id) + require("lsp-inlayhints").on_attach(client, bufnr) + end, + }) + end +} diff --git a/lua/custom/plugins/notify.lua b/lua/custom/plugins/notify.lua new file mode 100644 index 00000000..c0d3099d --- /dev/null +++ b/lua/custom/plugins/notify.lua @@ -0,0 +1,10 @@ +return { + "rcarriga/nvim-notify", + config = function() + local notify = require("notify") + -- this for transparency + notify.setup({ background_colour = "#000000" }) + -- this overwrites the vim notify function + vim.notify = notify.notify + end +} diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 00000000..91b0ebcd --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,6 @@ +return { + 'stevearc/oil.nvim', + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + } diff --git a/lua/custom/plugins/terminal.lua b/lua/custom/plugins/terminal.lua new file mode 100644 index 00000000..590643e8 --- /dev/null +++ b/lua/custom/plugins/terminal.lua @@ -0,0 +1,27 @@ +return { + "numToStr/FTerm.nvim", + opts = { + cmd = "bash", + blend = 50, + width = function() + return vim.opt.columns * 20 + end, + } + } +-- return { +-- "akinsho/toggleterm.nvim", +-- -- cmd = { "ToggleTerm", "TermExec" }, +-- opts = { +-- size = function() +-- return vim.opt.columns * 20 +-- end, +-- hide_numbers = false, +-- shading_factor = 2, +-- direction = "float", +-- float_opts = { +-- border = "curved", +-- highlights = { border = "Normal", background = "Normal" }, +-- }, +-- }, +-- } +-- diff --git a/lua/custom/plugins/todocomment.lua b/lua/custom/plugins/todocomment.lua new file mode 100644 index 00000000..93a58371 --- /dev/null +++ b/lua/custom/plugins/todocomment.lua @@ -0,0 +1,15 @@ +return { + "folke/todo-comments.nvim", + cmd = { "TodoTrouble", "TodoTelescope" }, event = { "BufReadPost", "BufNewFile" }, + config = true, + -- stylua: ignore + keys = { + { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, + { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, + { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, + { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, + { "st", "TodoTelescope", desc = "Todo" }, + { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, + }, + } + diff --git a/lua/custom/plugins/transparent.lua b/lua/custom/plugins/transparent.lua new file mode 100644 index 00000000..f08c0fe4 --- /dev/null +++ b/lua/custom/plugins/transparent.lua @@ -0,0 +1,9 @@ +return { + 'xiyaowong/transparent.nvim', + opts = { + extra_groups = { + "NormalFloat", -- plugins which have float panel such as Lazy, Mason, LspInfo + "NvimTreeNormal", -- NvimTree + }, + } +} diff --git a/lua/custom/theme.lua b/lua/custom/theme.lua new file mode 100644 index 00000000..d8c6dac9 --- /dev/null +++ b/lua/custom/theme.lua @@ -0,0 +1,10 @@ +return { + 'Shatur/neovim-ayu', +-- "folke/tokyonight.nvim", + priority = 1000, + -- opts = { style = "night" }, + config = function() + -- vim.cmd.colorscheme 'tokyonight' + vim.cmd.colorscheme 'ayu' + end +}