diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e033bc6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lazy-lock.json diff --git a/init.lua b/init.lua index 65d9b7a..f01d08e 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,18 @@ --- plex Neovim entry-point +-- rafi Neovim entry-point -- https://git.cscherr.de/PlexSheep/neovim-conf -local config = require('plex.config') +local config = require('rafi.config') config.ensure_lazy() -- Start lazy.nvim plugin manager. require('lazy').setup(vim.tbl_extend('keep', config.user_lazy_opts(), { spec = { - { import = 'plex.plugins' }, - -- { import = 'plex.plugins.extras.lang.go' }, - -- { import = 'plex.plugins.extras.lang.json' }, - -- { import = 'plex.plugins.extras.lang.python' }, - -- { import = 'plex.plugins.extras.lang.yaml' }, + { import = 'rafi.plugins' }, + { import = 'rafi.plugins.extras.lang.go' }, + { import = 'rafi.plugins.extras.lang.json' }, + { import = 'rafi.plugins.extras.lang.python' }, + { import = 'rafi.plugins.extras.lang.yaml' }, + { import = 'plugins' }, -- This will load a custom user lua/plugins.lua or lua/plugins/* config.has_user_plugins() and { import = 'plugins' } or nil, diff --git a/lua/plex/config/README.md b/lua/plex/config/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..81919fb --- /dev/null +++ b/lua/plugins/neo-tree.lua @@ -0,0 +1,78 @@ +local winwidth = 30 + +-- Toggle width. +local toggle_width = function() + local max = winwidth * 2 + local cur_width = vim.fn.winwidth(0) + local half = math.floor((winwidth + (max - winwidth) / 2) + 0.4) + local new_width = winwidth + if cur_width == winwidth then + new_width = half + elseif cur_width == half then + new_width = max + else + new_width = winwidth + end + vim.cmd(new_width .. ' wincmd |') +end + +return { + -- Change builtin plugins' options + { + 'nvim-neo-tree/neo-tree.nvim', + keys = { + { + '', + 'Neotree filesystem left toggle dir=./', + desc = 'Explorer NeoTree Toggle', + }, + }, + -- FIXME: Delete the damn event handler, keep the file window open when I + -- tell it to! + event_handlers = {nil}, + window = { + width = winwidth, + mappings = { + ['q'] = 'close_window', + ['?'] = 'noop', + [''] = 'noop', + + ['g?'] = 'show_help', + ['<2-LeftMouse>'] = 'open', + [''] = 'open_with_window_picker', + ['l'] = 'open_drop', + ['h'] = 'close_node', + ['C'] = 'close_node', + [''] = 'set_root', + ['z'] = 'close_all_nodes', + [''] = 'refresh', + + ['s'] = 'noop', + ['sv'] = 'open_split', + ['sg'] = 'open_vsplit', + ['st'] = 'open_tabnew', + + ['c'] = { 'copy', config = { show_path = 'relative' } }, + ['m'] = { 'move', config = { show_path = 'relative' } }, + ['a'] = { 'add', nowait = true, config = { show_path = 'relative' } }, + ['N'] = { 'add_directory', config = { show_path = 'relative' } }, + ['d'] = 'noop', + ['dd'] = 'delete', + ['r'] = 'rename', + ['y'] = 'copy_to_clipboard', + ['x'] = 'cut_to_clipboard', + ['P'] = 'paste_from_clipboard', + [''] = 'prev_source', + [''] = 'next_source', + + ['p'] = { + 'toggle_preview', + nowait = true, + config = { use_float = true }, + }, + + ['w'] = toggle_width, + }, + }, + }, +} diff --git a/lua/plugins/org/neorg.lua b/lua/plugins/org/neorg.lua new file mode 100644 index 0000000..7d78f7a --- /dev/null +++ b/lua/plugins/org/neorg.lua @@ -0,0 +1,22 @@ +return { + { + "nvim-neorg/neorg", + build = ":Neorg sync-parsers", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("neorg").setup { + load = { + ["core.defaults"] = {}, -- Loads default behaviour + ["core.concealer"] = {}, -- Adds pretty icons to your documents + ["core.dirman"] = { -- Manages Neorg workspaces + config = { + workspaces = { + notes = "~/notes", + }, + }, + }, + }, + } + end, + }, +} diff --git a/lua/plex/config/autocmds.lua b/lua/rafi/config/autocmds.lua similarity index 96% rename from lua/plex/config/autocmds.lua rename to lua/rafi/config/autocmds.lua index bed3c6f..26850fa 100644 --- a/lua/plex/config/autocmds.lua +++ b/lua/rafi/config/autocmds.lua @@ -1,11 +1,11 @@ -- Rafi's Neovim autocmds --- github.com/plex/vim-config +-- github.com/rafi/vim-config -- === --- This file is automatically loaded by plex.config.init +-- This file is automatically loaded by rafi.config.init local function augroup(name) - return vim.api.nvim_create_augroup('plex_' .. name, {}) + return vim.api.nvim_create_augroup('rafi_' .. name, {}) end -- Check if we need to reload the file when it changed diff --git a/lua/plex/config/init.lua b/lua/rafi/config/init.lua similarity index 94% rename from lua/plex/config/init.lua rename to lua/rafi/config/init.lua index a52cb89..a91db87 100644 --- a/lua/plex/config/init.lua +++ b/lua/rafi/config/init.lua @@ -1,5 +1,5 @@ -- Rafi's Neovim config loader --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config -- This is part of LazyVim's code, with my modifications. -- See: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/init.lua @@ -14,12 +14,12 @@ local defaults = { -- Load the default settings -- stylua: ignore defaults = { - autocmds = true, -- plex.config.autocmds - keymaps = true, -- plex.config.keymaps - -- plex.config.options can't be configured here since it's loaded + autocmds = true, -- rafi.config.autocmds + keymaps = true, -- rafi.config.keymaps + -- rafi.config.options can't be configured here since it's loaded -- prematurely. You can disable loading options with the following line at -- the top of your lua/config/setup.lua or init.lua: - -- `package.loaded['plex.config.options'] = true` + -- `package.loaded['rafi.config.options'] = true` }, -- String like `habamax` or a function that will load the colorscheme. @@ -107,12 +107,12 @@ function M.init() if not M.did_init then M.did_init = true -- delay notifications till vim.notify was replaced or after 500ms - require('plex.config').lazy_notify() + require('rafi.config').lazy_notify() -- load options here, before lazy init while sourcing plugin modules -- this is needed to make sure options will be correctly applied -- after installing missing plugins - require('plex.config').load('options') + require('rafi.config').load('options') -- carry over plugin options that their name has been changed. local Plugin = require('lazy.core.plugin') @@ -130,7 +130,7 @@ end ---@type RafiConfig local options --- Load plex and user config files. +-- Load rafi and user config files. ---@param user_opts table|nil function M.setup(user_opts) if not M.did_init then @@ -153,7 +153,7 @@ function M.setup(user_opts) options = vim.tbl_deep_extend('force', options, user_setup.override()) end for feat_name, feat_val in pairs(options.features) do - vim.g['plex_' .. feat_name] = feat_val + vim.g['rafi_' .. feat_name] = feat_val end M.load('autocmds') @@ -209,9 +209,9 @@ function M.load(name) end, }) end - -- always load plex's file, then user file + -- always load rafi's file, then user file if M.defaults[name] or name == 'options' then - _load('plex.config.' .. name) + _load('rafi.config.' .. name) end _load('config.' .. name) if vim.bo.filetype == 'lazy' then diff --git a/lua/plex/config/keymaps.lua b/lua/rafi/config/keymaps.lua similarity index 93% rename from lua/plex/config/keymaps.lua rename to lua/rafi/config/keymaps.lua index faaa3f3..cc3f9f2 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/rafi/config/keymaps.lua @@ -1,18 +1,18 @@ -- Rafi's Neovim keymaps --- github.com/plex/vim-config +-- github.com/rafi/vim-config -- === --- This file is automatically loaded by plex.config.init +-- This file is automatically loaded by rafi.config.init -local Util = require('plex.lib.utils') +local Util = require('rafi.lib.utils') local map = vim.keymap.set local function augroup(name) - return vim.api.nvim_create_augroup('plex_' .. name, {}) + return vim.api.nvim_create_augroup('rafi_' .. name, {}) end -- Elite-mode: Arrow-keys resize window -if vim.g.plex_elite_mode then +if vim.g.rafi_elite_mode then map('n', '', 'resize +1', { desc = 'Resize Window' }) map('n', '', 'resize -1', { desc = 'Resize Window' }) map('n', '', 'vertical resize +1', { desc = 'Resize Window' }) @@ -57,10 +57,10 @@ map('n', '[a', 'lprev', { desc = 'Previous Loclist Item' }) -- Whitespace jump (see plugin/whitespace.vim) map('n', ']s', function() - require('plex.lib.edit').whitespace_jump(1) + require('rafi.lib.edit').whitespace_jump(1) end, { desc = 'Next Whitespace' }) map('n', '[s', function() - require('plex.lib.edit').whitespace_jump(-1) + require('rafi.lib.edit').whitespace_jump(-1) end, { desc = 'Previous Whitespace' }) -- Navigation in command line @@ -160,7 +160,7 @@ map('x', 'sg', ':s//gc', { desc = 'Substitute Within Selection map( 'x', '', - ":%s/\\V=v:lua.require'plex.lib.edit'.get_visual_selection()" + ":%s/\\V=v:lua.require'rafi.lib.edit'.get_visual_selection()" .. '//gc', { desc = 'Replace Selection' } ) @@ -215,7 +215,7 @@ map({ 'n', 'i', 'v' }, '', 'write', { desc = 'Save' }) -- === -- Toggle editor's visual effects -map('n', 'uf', require('plex.plugins.lsp.format').toggle, { desc = 'Toggle format on Save' }) +map('n', 'uf', require('rafi.plugins.lsp.format').toggle, { desc = 'Toggle format on Save' }) map('n', 'us', 'setlocal spell!', { desc = 'Toggle Spellcheck' }) map('n', 'ul', 'setlocal nonumber!', { desc = 'Toggle Line Numbers' }) map('n', 'uo', 'setlocal nolist!', { desc = 'Toggle Whitespace Symbols' }) @@ -260,20 +260,20 @@ end -- Append mode-line to current buffer map('n', 'ml', function() - require('plex.lib.edit').append_modeline() + require('rafi.lib.edit').append_modeline() end, { desc = 'Append Modeline' }) -- Jump entire buffers throughout jumplist map('n', 'g', function() - require('plex.lib.edit').jump_buffer(1) + require('rafi.lib.edit').jump_buffer(1) end, { desc = 'Jump to newer buffer' }) map('n', 'g', function() - require('plex.lib.edit').jump_buffer(-1) + require('rafi.lib.edit').jump_buffer(-1) end, { desc = 'Jump to older buffer' }) -- Context aware menu. See lua/lib/contextmenu.lua map('n', 'c', function() - require('plex.lib.contextmenu').show() + require('rafi.lib.contextmenu').show() end, { desc = 'Content-aware menu' }) -- Lazygit @@ -307,7 +307,7 @@ end -- === -- Ultimatus Quitos -if vim.F.if_nil(vim.g.plex_window_q_mapping, true) then +if vim.F.if_nil(vim.g.rafi_window_q_mapping, true) then vim.api.nvim_create_autocmd({ 'BufWinEnter', 'VimEnter' }, { group = augroup('quit_mapping'), callback = function(event) @@ -321,7 +321,7 @@ end -- Toggle quickfix window map('n', 'q', function() - require('plex.lib.edit').toggle_list('quickfix') + require('rafi.lib.edit').toggle_list('quickfix') end, { desc = 'Open Quickfix' }) -- Set locations with diagnostics and open the list. @@ -329,7 +329,7 @@ map('n', 'a', function() if vim.bo.filetype ~= 'qf' then vim.diagnostic.setloclist({ open = false }) end - require('plex.lib.edit').toggle_list('loclist') + require('rafi.lib.edit').toggle_list('loclist') end, { desc = 'Open Location List' }) -- Switch with adjacent window diff --git a/lua/plex/config/options.lua b/lua/rafi/config/options.lua similarity index 99% rename from lua/plex/config/options.lua rename to lua/rafi/config/options.lua index c532917..25b3421 100644 --- a/lua/plex/config/options.lua +++ b/lua/rafi/config/options.lua @@ -1,5 +1,5 @@ -- Rafi's Neovim options --- github.com/plex/vim-config +-- github.com/rafi/vim-config -- === -- This file is automatically loaded by config.init or plugins.core diff --git a/lua/plex/init.lua b/lua/rafi/init.lua similarity index 68% rename from lua/plex/init.lua rename to lua/rafi/init.lua index 7cf4116..39c642e 100644 --- a/lua/plex/init.lua +++ b/lua/rafi/init.lua @@ -2,7 +2,7 @@ local M = {} ---@param opts? RafiConfig function M.setup(opts) - require('plex.config').setup(opts) + require('rafi.config').setup(opts) end return M diff --git a/lua/plex/lib/badge.lua b/lua/rafi/lib/badge.lua similarity index 97% rename from lua/plex/lib/badge.lua rename to lua/rafi/lib/badge.lua index 38854c0..faf00af 100644 --- a/lua/plex/lib/badge.lua +++ b/lua/rafi/lib/badge.lua @@ -1,5 +1,5 @@ -- Badge utilities --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config local plugin_icons = { DiffviewFiles = { '' }, @@ -27,7 +27,7 @@ local cache_keys = { 'badge_cache_icon', } -local augroup = vim.api.nvim_create_augroup('plex_badge', {}) +local augroup = vim.api.nvim_create_augroup('rafi_badge', {}) -- Clear cached values that relate to buffer filename. vim.api.nvim_create_autocmd( @@ -60,7 +60,7 @@ local M = {} -- Try to guess the project's name ---@return string function M.project() - return vim.fn.fnamemodify(require('plex.lib.utils').get_root(), ':t') or '' + return vim.fn.fnamemodify(require('rafi.lib.utils').get_root(), ':t') or '' end -- Provides relative path with limited characters in each directory name, and diff --git a/lua/plex/lib/color.lua b/lua/rafi/lib/color.lua similarity index 100% rename from lua/plex/lib/color.lua rename to lua/rafi/lib/color.lua diff --git a/lua/plex/lib/contextmenu.lua b/lua/rafi/lib/contextmenu.lua similarity index 98% rename from lua/plex/lib/contextmenu.lua rename to lua/rafi/lib/contextmenu.lua index 0fe9e47..3f6c135 100644 --- a/lua/plex/lib/contextmenu.lua +++ b/lua/rafi/lib/contextmenu.lua @@ -1,5 +1,5 @@ -- Context-aware menu --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config local M = {} diff --git a/lua/plex/lib/edit.lua b/lua/rafi/lib/edit.lua similarity index 98% rename from lua/plex/lib/edit.lua rename to lua/rafi/lib/edit.lua index 8da9131..2f2961e 100644 --- a/lua/plex/lib/edit.lua +++ b/lua/rafi/lib/edit.lua @@ -1,5 +1,5 @@ -- Edit utilities --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config local M = {} diff --git a/lua/plex/lib/preview.lua b/lua/rafi/lib/preview.lua similarity index 98% rename from lua/plex/lib/preview.lua rename to lua/rafi/lib/preview.lua index ed8bce2..e2851d9 100644 --- a/lua/plex/lib/preview.lua +++ b/lua/rafi/lib/preview.lua @@ -1,5 +1,5 @@ --- plex preview functions --- https://github.com/plex/vim-config +-- rafi preview functions +-- https://github.com/rafi/vim-config -- requires telescope local M = {} diff --git a/lua/plex/lib/utils.lua b/lua/rafi/lib/utils.lua similarity index 96% rename from lua/plex/lib/utils.lua rename to lua/rafi/lib/utils.lua index 2eb90c6..f0de2dd 100644 --- a/lua/plex/lib/utils.lua +++ b/lua/rafi/lib/utils.lua @@ -1,11 +1,11 @@ -- General utilities --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config local root_patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn' } local M = {} -local augroup_lsp_attach = vim.api.nvim_create_augroup('plex_lsp_attach', {}) +local augroup_lsp_attach = vim.api.nvim_create_augroup('rafi_lsp_attach', {}) ---@param on_attach fun(client:lsp.Client, buffer:integer) function M.on_attach(on_attach) diff --git a/lua/plex/plugins/coding.lua b/lua/rafi/plugins/coding.lua similarity index 98% rename from lua/plex/plugins/coding.lua rename to lua/rafi/plugins/coding.lua index 241679f..a991337 100644 --- a/lua/plex/plugins/coding.lua +++ b/lua/rafi/plugins/coding.lua @@ -1,5 +1,5 @@ -- Plugins: Coding --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config return { @@ -111,8 +111,8 @@ return { }), formatting = { format = function(entry, vim_item) - -- Prepend with a fancy icon from config lua/plex/config/init.lua - local icons = require('plex.config').icons + -- Prepend with a fancy icon from config lua/rafi/config/init.lua + local icons = require('rafi.config').icons if entry.source.name == 'git' then vim_item.kind = icons.git else diff --git a/lua/plex/plugins/colorscheme.lua b/lua/rafi/plugins/colorscheme.lua similarity index 89% rename from lua/plex/plugins/colorscheme.lua rename to lua/rafi/plugins/colorscheme.lua index d681225..eab3175 100644 --- a/lua/plex/plugins/colorscheme.lua +++ b/lua/rafi/plugins/colorscheme.lua @@ -1,17 +1,17 @@ -- Plugins: Colorschemes --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config return { { - 'plex/theme-loader.nvim', + 'rafi/theme-loader.nvim', lazy = false, priority = 99, opts = { initial_colorscheme = 'neohybrid' }, }, - { 'plex/neo-hybrid.vim', priority = 100, lazy = false }, - { 'plex/awesome-vim-colorschemes', lazy = false }, + { 'rafi/neo-hybrid.vim', priority = 100, lazy = false }, + { 'rafi/awesome-vim-colorschemes', lazy = false }, { 'AlexvZyl/nordic.nvim' }, { 'folke/tokyonight.nvim', opts = { style = 'night' } }, { 'rebelot/kanagawa.nvim' }, diff --git a/lua/plex/plugins/core.lua b/lua/rafi/plugins/core.lua similarity index 76% rename from lua/plex/plugins/core.lua rename to lua/rafi/plugins/core.lua index 1bb456d..efe9117 100644 --- a/lua/plex/plugins/core.lua +++ b/lua/rafi/plugins/core.lua @@ -1,4 +1,4 @@ -require('plex.config').init() +require('rafi.config').init() return { { 'folke/lazy.nvim', version = '*' }, diff --git a/lua/plex/plugins/editor.lua b/lua/rafi/plugins/editor.lua similarity index 97% rename from lua/plex/plugins/editor.lua rename to lua/rafi/plugins/editor.lua index d7dcbcd..9d18802 100644 --- a/lua/plex/plugins/editor.lua +++ b/lua/rafi/plugins/editor.lua @@ -1,5 +1,5 @@ -- Plugins: Editor --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config local is_windows = vim.loop.os_uname().sysname == 'Windows_NT' @@ -49,14 +49,14 @@ return { -- Detect if stdin has been provided. vim.g.in_pager_mode = false vim.api.nvim_create_autocmd('StdinReadPre', { - group = vim.api.nvim_create_augroup('plex_persisted', {}), + group = vim.api.nvim_create_augroup('rafi_persisted', {}), callback = function() vim.g.in_pager_mode = true end, }) -- Close all floats before loading a session. (e.g. Lazy.nvim) vim.api.nvim_create_autocmd('User', { - group = 'plex_persisted', + group = 'rafi_persisted', pattern = 'PersistedLoadPre', callback = function() for _, win in pairs(vim.api.nvim_tabpage_list_wins(0)) do @@ -69,7 +69,7 @@ return { -- Close all plugin owned buffers before saving a session. vim.api.nvim_create_autocmd('User', { pattern = 'PersistedSavePre', - group = 'plex_persisted', + group = 'rafi_persisted', callback = function() -- Detect if window is owned by plugin by checking buftype. local current_buffer = vim.api.nvim_get_current_buf() @@ -90,7 +90,7 @@ return { -- current session to avoid previous session to be overwritten. vim.api.nvim_create_autocmd('User', { pattern = 'PersistedTelescopeLoadPre', - group = 'plex_persisted', + group = 'rafi_persisted', callback = function() require('persisted').save() require('persisted').stop() @@ -100,7 +100,7 @@ return { -- will be auto-saved. vim.api.nvim_create_autocmd('User', { pattern = 'PersistedTelescopeLoadPost', - group = 'plex_persisted', + group = 'rafi_persisted', callback = function(session) require('persisted').start() print('Started session ' .. session.data.name) @@ -148,7 +148,7 @@ return { -- also set it after loading ftplugins, since a lot overwrite [[ and ]] vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('plex_illuminate', {}), + group = vim.api.nvim_create_augroup('rafi_illuminate', {}), callback = function() local buffer = vim.api.nvim_get_current_buf() map(']]', 'next', buffer) @@ -365,7 +365,7 @@ return { }, init = function() vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('plex_outline', {}), + group = vim.api.nvim_create_augroup('rafi_outline', {}), pattern = 'Outline', callback = function() vim.opt_local.winhighlight = 'CursorLine:WildMenu' diff --git a/lua/plex/plugins/extras/coding/autopairs.lua b/lua/rafi/plugins/extras/coding/autopairs.lua similarity index 100% rename from lua/plex/plugins/extras/coding/autopairs.lua rename to lua/rafi/plugins/extras/coding/autopairs.lua diff --git a/lua/plex/plugins/extras/coding/cmp-git.lua b/lua/rafi/plugins/extras/coding/cmp-git.lua similarity index 100% rename from lua/plex/plugins/extras/coding/cmp-git.lua rename to lua/rafi/plugins/extras/coding/cmp-git.lua diff --git a/lua/plex/plugins/extras/coding/copilot.lua b/lua/rafi/plugins/extras/coding/copilot.lua similarity index 93% rename from lua/plex/plugins/extras/coding/copilot.lua rename to lua/rafi/plugins/extras/coding/copilot.lua index e9bff62..79254e4 100644 --- a/lua/plex/plugins/extras/coding/copilot.lua +++ b/lua/rafi/plugins/extras/coding/copilot.lua @@ -24,7 +24,7 @@ return { optional = true, event = 'VeryLazy', opts = function(_, opts) - local get_color = require('plex.lib.color').get_color + local get_color = require('rafi.lib.color').get_color local fg = function(...) return { fg = get_color('fg', ...) } end @@ -38,7 +38,7 @@ return { -- Add copilot icon to lualine statusline table.insert(opts.sections.lualine_x, { function() - local icon = require('plex.config').icons.kinds.Copilot + local icon = require('rafi.config').icons.kinds.Copilot local status = require('copilot.api').status.data return icon .. (status.message or '') end, @@ -80,7 +80,7 @@ return { -- attach cmp source whenever copilot attaches -- fixes lazy-loading issues with the copilot cmp source ---@param client lsp.Client - require('plex.lib.utils').on_attach(function(client) + require('rafi.lib.utils').on_attach(function(client) if client.name == 'copilot' then copilot_cmp._on_insert_enter({}) end diff --git a/lua/plex/plugins/extras/coding/editorconfig.lua b/lua/rafi/plugins/extras/coding/editorconfig.lua similarity index 100% rename from lua/plex/plugins/extras/coding/editorconfig.lua rename to lua/rafi/plugins/extras/coding/editorconfig.lua diff --git a/lua/plex/plugins/extras/coding/emmet.lua b/lua/rafi/plugins/extras/coding/emmet.lua similarity index 91% rename from lua/plex/plugins/extras/coding/emmet.lua rename to lua/rafi/plugins/extras/coding/emmet.lua index 4d4dc45..1b8ff61 100644 --- a/lua/plex/plugins/extras/coding/emmet.lua +++ b/lua/rafi/plugins/extras/coding/emmet.lua @@ -10,7 +10,7 @@ return { end, config = function() vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('plex_emmet', {}), + group = vim.api.nvim_create_augroup('rafi_emmet', {}), pattern = { 'css', 'html', diff --git a/lua/plex/plugins/extras/coding/sandwich.lua b/lua/rafi/plugins/extras/coding/sandwich.lua similarity index 100% rename from lua/plex/plugins/extras/coding/sandwich.lua rename to lua/rafi/plugins/extras/coding/sandwich.lua diff --git a/lua/plex/plugins/extras/diagnostics/proselint.lua b/lua/rafi/plugins/extras/diagnostics/proselint.lua similarity index 100% rename from lua/plex/plugins/extras/diagnostics/proselint.lua rename to lua/rafi/plugins/extras/diagnostics/proselint.lua diff --git a/lua/plex/plugins/extras/diagnostics/write-good.lua b/lua/rafi/plugins/extras/diagnostics/write-good.lua similarity index 100% rename from lua/plex/plugins/extras/diagnostics/write-good.lua rename to lua/rafi/plugins/extras/diagnostics/write-good.lua diff --git a/lua/plex/plugins/extras/editor/anyjump.lua b/lua/rafi/plugins/extras/editor/anyjump.lua similarity index 90% rename from lua/plex/plugins/extras/editor/anyjump.lua rename to lua/rafi/plugins/extras/editor/anyjump.lua index 33134f5..d279abb 100644 --- a/lua/plex/plugins/extras/editor/anyjump.lua +++ b/lua/rafi/plugins/extras/editor/anyjump.lua @@ -11,7 +11,7 @@ return { init = function() vim.g.any_jump_disable_default_keybindings = 1 vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('plex_any-jump', {}), + group = vim.api.nvim_create_augroup('rafi_any-jump', {}), pattern = 'any-jump', callback = function() vim.opt.cursorline = true diff --git a/lua/plex/plugins/extras/editor/flybuf.lua b/lua/rafi/plugins/extras/editor/flybuf.lua similarity index 100% rename from lua/plex/plugins/extras/editor/flybuf.lua rename to lua/rafi/plugins/extras/editor/flybuf.lua diff --git a/lua/plex/plugins/extras/editor/sidebar.lua b/lua/rafi/plugins/extras/editor/sidebar.lua similarity index 100% rename from lua/plex/plugins/extras/editor/sidebar.lua rename to lua/rafi/plugins/extras/editor/sidebar.lua diff --git a/lua/plex/plugins/extras/editor/ufo.lua b/lua/rafi/plugins/extras/editor/ufo.lua similarity index 100% rename from lua/plex/plugins/extras/editor/ufo.lua rename to lua/rafi/plugins/extras/editor/ufo.lua diff --git a/lua/plex/plugins/extras/formatting/prettier.lua b/lua/rafi/plugins/extras/formatting/prettier.lua similarity index 100% rename from lua/plex/plugins/extras/formatting/prettier.lua rename to lua/rafi/plugins/extras/formatting/prettier.lua diff --git a/lua/plex/plugins/extras/git/fugitive.lua b/lua/rafi/plugins/extras/git/fugitive.lua similarity index 91% rename from lua/plex/plugins/extras/git/fugitive.lua rename to lua/rafi/plugins/extras/git/fugitive.lua index 30e43cc..9045dfa 100644 --- a/lua/plex/plugins/extras/git/fugitive.lua +++ b/lua/rafi/plugins/extras/git/fugitive.lua @@ -10,7 +10,7 @@ return { }, config = function() vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('plex_fugitive', {}), + group = vim.api.nvim_create_augroup('rafi_fugitive', {}), pattern = 'fugitiveblame', callback = function() vim.schedule(function() diff --git a/lua/plex/plugins/extras/lang/ansible.lua b/lua/rafi/plugins/extras/lang/ansible.lua similarity index 94% rename from lua/plex/plugins/extras/lang/ansible.lua rename to lua/rafi/plugins/extras/lang/ansible.lua index b3a4f49..4e52dcf 100644 --- a/lua/plex/plugins/extras/lang/ansible.lua +++ b/lua/rafi/plugins/extras/lang/ansible.lua @@ -1,4 +1,4 @@ --- plex.plugins.extras.lang.ansible +-- rafi.plugins.extras.lang.ansible -- return { @@ -26,7 +26,7 @@ return { -- Setup filetype settings vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('plex_ftplugin_ansible', {}), + group = vim.api.nvim_create_augroup('rafi_ftplugin_ansible', {}), pattern = 'ansible', callback = function() -- Add '.' to iskeyword for ansible modules, e.g. ansible.builtin.copy diff --git a/lua/plex/plugins/extras/lang/docker.lua b/lua/rafi/plugins/extras/lang/docker.lua similarity index 100% rename from lua/plex/plugins/extras/lang/docker.lua rename to lua/rafi/plugins/extras/lang/docker.lua diff --git a/lua/plex/plugins/extras/lang/go.lua b/lua/rafi/plugins/extras/lang/go.lua similarity index 98% rename from lua/plex/plugins/extras/lang/go.lua rename to lua/rafi/plugins/extras/lang/go.lua index a8c89fb..0f0a847 100644 --- a/lua/plex/plugins/extras/lang/go.lua +++ b/lua/rafi/plugins/extras/lang/go.lua @@ -95,7 +95,7 @@ return { gopls = function(_, _) -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 - require('plex.lib.utils').on_attach(function(client, _) + require('rafi.lib.utils').on_attach(function(client, _) if client.name == 'gopls' then if not client.server_capabilities.semanticTokensProvider then local semantic = diff --git a/lua/plex/plugins/extras/lang/helm.lua b/lua/rafi/plugins/extras/lang/helm.lua similarity index 92% rename from lua/plex/plugins/extras/lang/helm.lua rename to lua/rafi/plugins/extras/lang/helm.lua index 4b70967..e76e44c 100644 --- a/lua/plex/plugins/extras/lang/helm.lua +++ b/lua/rafi/plugins/extras/lang/helm.lua @@ -1,4 +1,4 @@ --- plex.plugins.extras.lang.helm +-- rafi.plugins.extras.lang.helm -- return { diff --git a/lua/plex/plugins/extras/lang/json.lua b/lua/rafi/plugins/extras/lang/json.lua similarity index 100% rename from lua/plex/plugins/extras/lang/json.lua rename to lua/rafi/plugins/extras/lang/json.lua diff --git a/lua/plex/plugins/extras/lang/python.lua b/lua/rafi/plugins/extras/lang/python.lua similarity index 93% rename from lua/plex/plugins/extras/lang/python.lua rename to lua/rafi/plugins/extras/lang/python.lua index a4c5a21..1660af9 100644 --- a/lua/plex/plugins/extras/lang/python.lua +++ b/lua/rafi/plugins/extras/lang/python.lua @@ -1,4 +1,4 @@ --- plex.plugins.extras.lang.python +-- rafi.plugins.extras.lang.python -- -- This is part of LazyVim's code, with my modifications. @@ -19,7 +19,7 @@ return { { 'neovim/nvim-lspconfig', - dependencies = 'plex/neoconf-venom.nvim', + dependencies = 'rafi/neoconf-venom.nvim', opts = { servers = { pyright = {}, @@ -28,7 +28,7 @@ return { }, { - 'plex/neoconf-venom.nvim', + 'rafi/neoconf-venom.nvim', main = 'venom', opts = {}, -- stylua: ignore diff --git a/lua/plex/plugins/extras/lang/terraform.lua b/lua/rafi/plugins/extras/lang/terraform.lua similarity index 100% rename from lua/plex/plugins/extras/lang/terraform.lua rename to lua/rafi/plugins/extras/lang/terraform.lua diff --git a/lua/plex/plugins/extras/lang/typescript.lua b/lua/rafi/plugins/extras/lang/typescript.lua similarity index 100% rename from lua/plex/plugins/extras/lang/typescript.lua rename to lua/rafi/plugins/extras/lang/typescript.lua diff --git a/lua/plex/plugins/extras/lang/yaml.lua b/lua/rafi/plugins/extras/lang/yaml.lua similarity index 100% rename from lua/plex/plugins/extras/lang/yaml.lua rename to lua/rafi/plugins/extras/lang/yaml.lua diff --git a/lua/plex/plugins/extras/linting/ruff.lua b/lua/rafi/plugins/extras/linting/ruff.lua similarity index 93% rename from lua/plex/plugins/extras/linting/ruff.lua rename to lua/rafi/plugins/extras/linting/ruff.lua index 20592da..c06a2e2 100644 --- a/lua/plex/plugins/extras/linting/ruff.lua +++ b/lua/rafi/plugins/extras/linting/ruff.lua @@ -17,7 +17,7 @@ return { opts.root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor() - require('plex.lib.utils').on_attach(function(client, _) + require('rafi.lib.utils').on_attach(function(client, _) if client.name == 'ruff_lsp' then client.server_capabilities.hoverProvider = false end diff --git a/lua/plex/plugins/extras/lsp/gtd.lua b/lua/rafi/plugins/extras/lsp/gtd.lua similarity index 100% rename from lua/plex/plugins/extras/lsp/gtd.lua rename to lua/rafi/plugins/extras/lsp/gtd.lua diff --git a/lua/plex/plugins/extras/lsp/inlayhints.lua b/lua/rafi/plugins/extras/lsp/inlayhints.lua similarity index 100% rename from lua/plex/plugins/extras/lsp/inlayhints.lua rename to lua/rafi/plugins/extras/lsp/inlayhints.lua diff --git a/lua/plex/plugins/extras/lsp/lightbulb.lua b/lua/rafi/plugins/extras/lsp/lightbulb.lua similarity index 85% rename from lua/plex/plugins/extras/lsp/lightbulb.lua rename to lua/rafi/plugins/extras/lsp/lightbulb.lua index 9109007..54d44a0 100644 --- a/lua/plex/plugins/extras/lsp/lightbulb.lua +++ b/lua/rafi/plugins/extras/lsp/lightbulb.lua @@ -10,7 +10,7 @@ return { config = function(_, opts) require('nvim-lightbulb').setup(opts) vim.api.nvim_create_autocmd('CursorHold', { - group = vim.api.nvim_create_augroup('plex_lightbulb', {}), + group = vim.api.nvim_create_augroup('rafi_lightbulb', {}), callback = function() require('nvim-lightbulb').update_lightbulb() end, diff --git a/lua/plex/plugins/extras/lsp/null-ls.lua b/lua/rafi/plugins/extras/lsp/null-ls.lua similarity index 100% rename from lua/plex/plugins/extras/lsp/null-ls.lua rename to lua/rafi/plugins/extras/lsp/null-ls.lua diff --git a/lua/plex/plugins/extras/lsp/yaml-companion.lua b/lua/rafi/plugins/extras/lsp/yaml-companion.lua similarity index 91% rename from lua/plex/plugins/extras/lsp/yaml-companion.lua rename to lua/rafi/plugins/extras/lsp/yaml-companion.lua index 378c822..3bd9ad6 100644 --- a/lua/plex/plugins/extras/lsp/yaml-companion.lua +++ b/lua/rafi/plugins/extras/lsp/yaml-companion.lua @@ -6,7 +6,7 @@ return { setup = { yamlls = function(_, _) local yamlls_opts = require('yaml-companion').setup( - require('plex.lib.utils').opts('yaml-companion.nvim') + require('rafi.lib.utils').opts('yaml-companion.nvim') ) require('lspconfig')['yamlls'].setup(yamlls_opts) return true diff --git a/lua/plex/plugins/extras/org/vimwiki.lua b/lua/rafi/plugins/extras/org/vimwiki.lua similarity index 100% rename from lua/plex/plugins/extras/org/vimwiki.lua rename to lua/rafi/plugins/extras/org/vimwiki.lua diff --git a/lua/plex/plugins/extras/treesitter/treesj.lua b/lua/rafi/plugins/extras/treesitter/treesj.lua similarity index 100% rename from lua/plex/plugins/extras/treesitter/treesj.lua rename to lua/rafi/plugins/extras/treesitter/treesj.lua diff --git a/lua/plex/plugins/extras/ui/barbecue.lua b/lua/rafi/plugins/extras/ui/barbecue.lua similarity index 93% rename from lua/plex/plugins/extras/ui/barbecue.lua rename to lua/rafi/plugins/extras/ui/barbecue.lua index db3ef36..89c76ef 100644 --- a/lua/plex/plugins/extras/ui/barbecue.lua +++ b/lua/rafi/plugins/extras/ui/barbecue.lua @@ -15,7 +15,7 @@ return { opts = function() local kind_icons = vim.tbl_map(function(icon) return vim.trim(icon) - end, require('plex.config').icons.kinds) + end, require('rafi.config').icons.kinds) return { attach_navic = false, show_dirname = false, diff --git a/lua/plex/plugins/extras/ui/bufferline.lua b/lua/rafi/plugins/extras/ui/bufferline.lua similarity index 89% rename from lua/plex/plugins/extras/ui/bufferline.lua rename to lua/rafi/plugins/extras/ui/bufferline.lua index 9fdeb9c..2371e8c 100644 --- a/lua/plex/plugins/extras/ui/bufferline.lua +++ b/lua/rafi/plugins/extras/ui/bufferline.lua @@ -11,14 +11,14 @@ return { diagnostics = false, always_show_bufferline = true, diagnostics_indicator = function(_, _, diag) - local icons = require('plex.config').icons.diagnostics + local icons = require('rafi.config').icons.diagnostics local ret = (diag.error and icons.Error .. diag.error .. ' ' or '') .. (diag.warning and icons.Warn .. diag.warning or '') return vim.trim(ret) end, custom_areas = { right = function() - local project_root = require('plex.lib.badge').project() + local project_root = require('rafi.lib.badge').project() local result = {} local part = {} part.text = '%#BufferLineTab# ' .. project_root diff --git a/lua/plex/plugins/extras/ui/cursorword.lua b/lua/rafi/plugins/extras/ui/cursorword.lua similarity index 93% rename from lua/plex/plugins/extras/ui/cursorword.lua rename to lua/rafi/plugins/extras/ui/cursorword.lua index 6a99446..70dc73f 100644 --- a/lua/plex/plugins/extras/ui/cursorword.lua +++ b/lua/rafi/plugins/extras/ui/cursorword.lua @@ -6,7 +6,7 @@ return { vim.g.cursorword = 0 end, config = function() - local augroup = vim.api.nvim_create_augroup('plex_cursorword', {}) + local augroup = vim.api.nvim_create_augroup('rafi_cursorword', {}) vim.api.nvim_create_autocmd('FileType', { group = augroup, pattern = { diff --git a/lua/plex/plugins/extras/ui/cybu.lua b/lua/rafi/plugins/extras/ui/cybu.lua similarity index 100% rename from lua/plex/plugins/extras/ui/cybu.lua rename to lua/rafi/plugins/extras/ui/cybu.lua diff --git a/lua/plex/plugins/extras/ui/deadcolumn.lua b/lua/rafi/plugins/extras/ui/deadcolumn.lua similarity index 100% rename from lua/plex/plugins/extras/ui/deadcolumn.lua rename to lua/rafi/plugins/extras/ui/deadcolumn.lua diff --git a/lua/plex/plugins/extras/ui/goto-preview.lua b/lua/rafi/plugins/extras/ui/goto-preview.lua similarity index 100% rename from lua/plex/plugins/extras/ui/goto-preview.lua rename to lua/rafi/plugins/extras/ui/goto-preview.lua diff --git a/lua/plex/plugins/extras/ui/incline.lua b/lua/rafi/plugins/extras/ui/incline.lua similarity index 100% rename from lua/plex/plugins/extras/ui/incline.lua rename to lua/rafi/plugins/extras/ui/incline.lua diff --git a/lua/plex/plugins/extras/ui/minimap.lua b/lua/rafi/plugins/extras/ui/minimap.lua similarity index 100% rename from lua/plex/plugins/extras/ui/minimap.lua rename to lua/rafi/plugins/extras/ui/minimap.lua diff --git a/lua/plex/plugins/extras/ui/statuscol.lua b/lua/rafi/plugins/extras/ui/statuscol.lua similarity index 100% rename from lua/plex/plugins/extras/ui/statuscol.lua rename to lua/rafi/plugins/extras/ui/statuscol.lua diff --git a/lua/plex/plugins/git.lua b/lua/rafi/plugins/git.lua similarity index 100% rename from lua/plex/plugins/git.lua rename to lua/rafi/plugins/git.lua diff --git a/lua/plex/plugins/lsp/format.lua b/lua/rafi/plugins/lsp/format.lua similarity index 96% rename from lua/plex/plugins/lsp/format.lua rename to lua/rafi/plugins/lsp/format.lua index 01d896a..6b7bed7 100644 --- a/lua/plex/plugins/lsp/format.lua +++ b/lua/rafi/plugins/lsp/format.lua @@ -1,5 +1,5 @@ -- LSP: Auto-format on save --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config -- This is part of LazyVim's code, with my modifications. -- See: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/lsp/format.lua @@ -53,7 +53,7 @@ function M.format(opts) filter = function(client) return vim.tbl_contains(client_ids, client.id) end, - }, require('plex.lib.utils').opts('nvim-lspconfig').format or {})) + }, require('rafi.lib.utils').opts('nvim-lspconfig').format or {})) end ---@param formatters LazyVimFormatters @@ -154,7 +154,7 @@ end function M.setup(opts) M.opts = opts vim.api.nvim_create_autocmd('BufWritePre', { - group = vim.api.nvim_create_augroup('plex_format', {}), + group = vim.api.nvim_create_augroup('rafi_format', {}), callback = function() if M.opts.autoformat then M.format() diff --git a/lua/plex/plugins/lsp/highlight.lua b/lua/rafi/plugins/lsp/highlight.lua similarity index 91% rename from lua/plex/plugins/lsp/highlight.lua rename to lua/rafi/plugins/lsp/highlight.lua index ba9e368..7d90651 100644 --- a/lua/plex/plugins/lsp/highlight.lua +++ b/lua/rafi/plugins/lsp/highlight.lua @@ -1,5 +1,5 @@ -- LSP: Highlights --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config -- This is part of LunarVim's code, with my modifications. -- Reference: https://github.com/LunarVim/LunarVim @@ -9,7 +9,7 @@ local M = {} ---@param client lsp.Client ---@param bufnr integer function M.on_attach(client, bufnr) - if require('plex.lib.utils').has('vim-illuminate') then + if require('rafi.lib.utils').has('vim-illuminate') then -- Skipped setup for document_highlight, illuminate is installed. return end diff --git a/lua/plex/plugins/lsp/init.lua b/lua/rafi/plugins/lsp/init.lua similarity index 94% rename from lua/plex/plugins/lsp/init.lua rename to lua/rafi/plugins/lsp/init.lua index c5ad749..ee75143 100644 --- a/lua/plex/plugins/lsp/init.lua +++ b/lua/rafi/plugins/lsp/init.lua @@ -1,5 +1,5 @@ -- LSP: Plugins --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config -- This is part of LazyVim's code, with my modifications. -- See: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/lsp/init.lua @@ -18,7 +18,7 @@ return { { 'hrsh7th/cmp-nvim-lsp', cond = function() - return require('plex.lib.utils').has('nvim-cmp') + return require('rafi.lib.utils').has('nvim-cmp') end, }, }, @@ -90,19 +90,19 @@ return { }, ---@param opts PluginLspOpts config = function(_, opts) - if require('plex.lib.utils').has('neoconf.nvim') then + if require('rafi.lib.utils').has('neoconf.nvim') then local plugin = require('lazy.core.config').spec.plugins['neoconf.nvim'] require('neoconf').setup(require('lazy.core.plugin').values(plugin, 'opts', false)) end -- Setup autoformat - require('plex.plugins.lsp.format').setup(opts) + require('rafi.plugins.lsp.format').setup(opts) -- Setup formatting, keymaps and highlights. - local lsp_on_attach = require('plex.lib.utils').on_attach + local lsp_on_attach = require('rafi.lib.utils').on_attach ---@param client lsp.Client ---@param buffer integer lsp_on_attach(function(client, buffer) - require('plex.plugins.lsp.keymaps').on_attach(client, buffer) - require('plex.plugins.lsp.highlight').on_attach(client, buffer) + require('rafi.plugins.lsp.keymaps').on_attach(client, buffer) + require('rafi.plugins.lsp.highlight').on_attach(client, buffer) if vim.diagnostic.is_disabled() or vim.bo[buffer].buftype ~= '' then vim.diagnostic.disable(buffer) @@ -120,13 +120,13 @@ return { local client = vim.lsp.get_client_by_id(client_id) local buffer = vim.api.nvim_get_current_buf() if client ~= nil then - require('plex.plugins.lsp.keymaps').on_attach(client, buffer) + require('rafi.plugins.lsp.keymaps').on_attach(client, buffer) end return ret end -- Diagnostics signs and highlights - for type, icon in pairs(require('plex.config').icons.diagnostics) do + for type, icon in pairs(require('rafi.config').icons.diagnostics) do local hl = 'DiagnosticSign' .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' }) end @@ -148,7 +148,7 @@ return { opts.diagnostics.virtual_text.prefix = vim.fn.has('nvim-0.10') == 0 and '●' or function(diagnostic) - local icons = require('plex.config').icons.diagnostics + local icons = require('rafi.config').icons.diagnostics for d, icon in pairs(icons) do if diagnostic.severity == vim.diagnostic.severity[d:upper()] then return icon diff --git a/lua/plex/plugins/lsp/keymaps.lua b/lua/rafi/plugins/lsp/keymaps.lua similarity index 95% rename from lua/plex/plugins/lsp/keymaps.lua rename to lua/rafi/plugins/lsp/keymaps.lua index f234ebe..597d33d 100644 --- a/lua/plex/plugins/lsp/keymaps.lua +++ b/lua/rafi/plugins/lsp/keymaps.lua @@ -1,5 +1,5 @@ -- LSP: Key-maps --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config local M = {} @@ -12,7 +12,7 @@ function M.get() return M._keys end local format = function() - require('plex.plugins.lsp.format').format({ force = true }) + require('rafi.plugins.lsp.format').format({ force = true }) end ---@class PluginLspKeys @@ -36,7 +36,7 @@ function M.get() { 'K', function() -- Show hover documentation or folded lines. - local winid = require('plex.lib.utils').has('nvim-ufo') + local winid = require('rafi.lib.utils').has('nvim-ufo') and require('ufo').peekFoldedLinesUnderCursor() or nil if not winid then vim.lsp.buf.hover() @@ -99,7 +99,7 @@ function M.resolve(buffer) add(keymap) end - local opts = require('plex.lib.utils').opts('nvim-lspconfig') + local opts = require('rafi.lib.utils').opts('nvim-lspconfig') local clients if vim.lsp.get_clients ~= nil then clients = vim.lsp.get_clients({ bufnr = buffer }) diff --git a/lua/plex/plugins/lualine.lua b/lua/rafi/plugins/lualine.lua similarity index 92% rename from lua/plex/plugins/lualine.lua rename to lua/rafi/plugins/lualine.lua index eca8701..4e6dda0 100644 --- a/lua/plex/plugins/lualine.lua +++ b/lua/rafi/plugins/lualine.lua @@ -1,5 +1,5 @@ -- Plugin: Lualine --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config return { @@ -15,12 +15,12 @@ return { vim.g.qf_disable_statusline = true end, opts = function() - local icons = require('plex.config').icons - local get_color = require('plex.lib.color').get_color + local icons = require('rafi.config').icons + local get_color = require('rafi.lib.color').get_color local fg = function(...) return { fg = get_color('fg', ...) } end local function filepath() - local fpath = require('plex.lib.badge').filepath(0, 3, 5) + local fpath = require('rafi.lib.badge').filepath(0, 3, 5) -- % char must be escaped in statusline. return fpath:gsub('%%', '%%%%') end @@ -53,11 +53,11 @@ return { x = active, y = { fg = active.fg, - bg = require('plex.lib.color').brightness_modifier(active.bg, -20), + bg = require('rafi.lib.color').brightness_modifier(active.bg, -20), }, z = { fg = active.fg, - bg = require('plex.lib.color').brightness_modifier(active.bg, 63), + bg = require('rafi.lib.color').brightness_modifier(active.bg, 63), }, }, inactive = { @@ -116,7 +116,7 @@ return { }, lualine_b = { { - function() return require('plex.lib.badge').icon() end, + function() return require('rafi.lib.badge').icon() end, padding = { left = 1, right = 0 }, }, { @@ -160,7 +160,7 @@ return { -- Whitespace trails { - function() return require('plex.lib.badge').trails('␣') end, + function() return require('rafi.lib.badge').trails('␣') end, cond = is_file_window, padding = { left = 1, right = 0 }, color = { fg = get_color('bg', {'Identifier'}, '#b294bb') }, @@ -229,7 +229,7 @@ return { }, lualine_y = { { - function() return require('plex.lib.badge').filemedia('  ') end, + function() return require('rafi.lib.badge').filemedia('  ') end, cond = function() return is_min_width(70) end, separator = { left = '' }, padding = 1, @@ -254,7 +254,7 @@ return { inactive_sections = { lualine_a = { { - function() return require('plex.lib.badge').icon() end, + function() return require('rafi.lib.badge').icon() end, padding = 1, }, { filepath, padding = { left = 1, right = 0 } }, diff --git a/lua/plex/plugins/neo-tree.lua b/lua/rafi/plugins/neo-tree.lua similarity index 93% rename from lua/plex/plugins/neo-tree.lua rename to lua/rafi/plugins/neo-tree.lua index a7fdf29..8afacca 100644 --- a/lua/plex/plugins/neo-tree.lua +++ b/lua/rafi/plugins/neo-tree.lua @@ -47,6 +47,11 @@ return { 'Neotree filesystem left toggle dir=./', desc = 'Explorer NeoTree Toggle', }, + { + 'a', + 'Neotree filesystem left reveal dir=./', + desc = 'Explorer NeoTree Reveal', + }, }, deactivate = function() vim.cmd([[Neotree close]]) @@ -75,15 +80,15 @@ return { }, }, - -- event_handlers = { - -- -- Close neo-tree when opening a file. - -- { - -- event = 'file_opened', - -- handler = function() - -- require('neo-tree').close_all() - -- end, - -- }, - -- }, + event_handlers = { + -- Close neo-tree when opening a file. + { + event = 'file_opened', + handler = function() + require('neo-tree').close_all() + end, + }, + }, default_component_configs = { indent = { @@ -124,15 +129,15 @@ return { width = winwidth, mappings = { ['q'] = 'close_window', - ['?'] = 'show_help', + ['?'] = 'noop', [''] = 'noop', ['g?'] = 'show_help', ['<2-LeftMouse>'] = 'open', [''] = 'open_with_window_picker', ['l'] = 'open_drop', - ['h'] = 'change_root_to_node', - ['C'] = 'cd', + ['h'] = 'close_node', + ['C'] = 'close_node', ['z'] = 'close_all_nodes', [''] = 'refresh', diff --git a/lua/plex/plugins/telescope.lua b/lua/rafi/plugins/telescope.lua similarity index 100% rename from lua/plex/plugins/telescope.lua rename to lua/rafi/plugins/telescope.lua diff --git a/lua/plex/plugins/treesitter.lua b/lua/rafi/plugins/treesitter.lua similarity index 100% rename from lua/plex/plugins/treesitter.lua rename to lua/rafi/plugins/treesitter.lua diff --git a/lua/plex/plugins/ui.lua b/lua/rafi/plugins/ui.lua similarity index 97% rename from lua/plex/plugins/ui.lua rename to lua/rafi/plugins/ui.lua index 77e173f..9737f3b 100644 --- a/lua/plex/plugins/ui.lua +++ b/lua/rafi/plugins/ui.lua @@ -1,12 +1,12 @@ -- Plugins: UI --- https://github.com/plex/vim-config +-- https://github.com/rafi/vim-config return { ----------------------------------------------------------------------------- { 'nvim-tree/nvim-web-devicons', lazy = false }, { 'MunifTanjim/nui.nvim', lazy = false }, - { 'plex/tabstrip.nvim', lazy = false, priority = 98, opts = true }, + { 'rafi/tabstrip.nvim', lazy = false, priority = 98, opts = true }, ----------------------------------------------------------------------------- { @@ -149,7 +149,7 @@ return { ---@param client lsp.Client ---@param buffer integer - require('plex.lib.utils').on_attach(function(client, buffer) + require('rafi.lib.utils').on_attach(function(client, buffer) if client.server_capabilities.documentSymbolProvider then require('nvim-navic').attach(client, buffer) end @@ -159,7 +159,7 @@ return { return { separator = '  ', highlight = true, - icons = require('plex.config').icons.kinds, + icons = require('rafi.config').icons.kinds, } end, }, @@ -188,7 +188,7 @@ return { }, init = function() -- When noice is not enabled, install notify on VeryLazy - local Util = require('plex.lib.utils') + local Util = require('rafi.lib.utils') if not Util.has('noice.nvim') then Util.on_very_lazy(function() vim.notify = require('notify')