diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 155e723..372d7c2 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,2 +1,24 @@ -require("clint") +-- ├── init.lua +-- ├── ... +-- └── lua +-- ├── plugins +-- │ ├── init.lua +-- │ └── telescope.lua +-- └── clint +-- ├── init.lua +-- ├── lazy_bootstrap.lua +-- ├── maps.lua +-- └── options.lua + +----------------------------------------------[[ Bootstrap Lazy ]] + +require("clint/lazy_bootstrap") -- bootstraps folke/lazy + +----------------------------------------------[[ User Settings ]] + +require("clint") -- loads lua/clint/init.lua + +----------------------------------------------[[ Load Plugins ]] + +require("lazy").setup("plugins") -- loads each lua/plugin/* diff --git a/nvim/.config/nvim/lua/clint/init.lua b/nvim/.config/nvim/lua/clint/init.lua index 6cf447e..e69de29 100644 --- a/nvim/.config/nvim/lua/clint/init.lua +++ b/nvim/.config/nvim/lua/clint/init.lua @@ -1,6 +0,0 @@ -require("clint.plugins") -require("clint.keybindings") -require("clint.settings") -require("clint.colorscheme") -require("clint.lsp") -require("clint.statusline") diff --git a/nvim/.config/nvim/lua/clint/lazy_bootstrap.lua b/nvim/.config/nvim/lua/clint/lazy_bootstrap.lua new file mode 100644 index 0000000..049159d --- /dev/null +++ b/nvim/.config/nvim/lua/clint/lazy_bootstrap.lua @@ -0,0 +1,12 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--single-branch", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) +end +vim.opt.runtimepath:prepend(lazypath) diff --git a/nvim/.config/nvim/lua/clint/plugins.lua b/nvim/.config/nvim/lua/clint/plugins.lua index 8139293..6759ebb 100644 --- a/nvim/.config/nvim/lua/clint/plugins.lua +++ b/nvim/.config/nvim/lua/clint/plugins.lua @@ -1,159 +1,5 @@ -vim.fn.setenv("MACOSX_DEPLOYMENT_TARGET", "12.2.1") - -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use('wbthomason/packer.nvim') - - -- LSP - -- mason - manager for lsp, dap, linter - use("williamboman/mason.nvim") - use("williamboman/mason-lspconfig.nvim") - use('neovim/nvim-lspconfig') - use('hrsh7th/cmp-nvim-lsp') - use('hrsh7th/cmp-nvim-lua') - use('hrsh7th/cmp-buffer') - use('hrsh7th/cmp-path') - use('hrsh7th/nvim-cmp') - use('saadparwaiz1/cmp_luasnip') - - -- Linter - use('jose-elias-alvarez/null-ls.nvim') - local null_ls = require('null-ls') - - require('null-ls').setup({ - sources = { null_ls.builtins.diagnostics.selene } - }) - - -- colorschemes - use('ayu-theme/ayu-vim') - use('morhetz/gruvbox') - use('dikiaap/minimalist') - use('jacoborus/tender.vim') - use('jpo/vim-railscasts-theme') - use('rainux/vim-desert-warm-256') - use('ajmwagar/vim-deus') - use("rebelot/kanagawa.nvim") - -- airline - use('nvim-lualine/lualine.nvim') - - -- Git - use('kdheepak/lazygit.nvim') - - -- Sessions - use("tpope/vim-obsession") - - -- SuperTab - use('ervandew/supertab') - - -- Vim-surround - use('tpope/vim-surround') - - -- Slime, for tmux repl-ing - use('jpalardy/vim-slime') - - -- Telescope, fuzzy finding - use('nvim-lua/plenary.nvim') - use('nvim-telescope/telescope.nvim') - use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } - use("nvim-telescope/telescope-file-browser.nvim") - - -- Treesitter - use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } - - -- Devicons - use('kyazdani42/nvim-web-devicons') - - -- Registry history - use { - "AckslD/nvim-neoclip.lua", - requires = { - { 'kkharji/sqlite.lua', module = 'sqlite' }, - { 'nvim-telescope/telescope.nvim' }, - }, - config = function() - require('neoclip').setup({ - enable_persistent_history = true, - continuous_sync = true - } - ) - end, - } - - -- Buffers - use('matbme/JABS.nvim') - require("jabs").setup {} - - -- Comments - use { - 'numToStr/Comment.nvim', - config = function() - require('Comment').setup() - end - } - - -- Git Repo Telescope - use { 'cljoly/telescope-repo.nvim' } - - -- Greeter - use { - 'goolord/alpha-nvim', - requires = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require 'alpha'.setup(require 'alpha.themes.startify'.config) - end - } - - -- Which-Key - use { - "folke/which-key.nvim", - config = function() - require("which-key").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end - } - - -- Close brackets - use { - "windwp/nvim-autopairs", - config = function() require("nvim-autopairs").setup {} end - } - - -- Cursor line - use('yamatsum/nvim-cursorline') - require('nvim-cursorline').setup { - cursorline = { - enable = true, - timeout = 0, - number = true, - }, - cursorword = { - enable = false, - } - } - - -- file ex - use { - "nvim-neo-tree/neo-tree.nvim", - branch = "v2.x", - requires = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - } - } - - -- Indent lines - require("packer").startup(function() - use "lukas-reineke/indent-blankline.nvim" - end) - - -- Object Explorer - use 'simrat39/symbols-outline.nvim' - -end -) +require("lazy").setup({ + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + "folke/neodev.nvim", +}) diff --git a/nvim/.config/nvim/lua/clint/telescope.lua b/nvim/.config/nvim/lua/clint/telescope.lua new file mode 100644 index 0000000..9d6781a --- /dev/null +++ b/nvim/.config/nvim/lua/clint/telescope.lua @@ -0,0 +1,21 @@ +local M = { + 'nvim-telescope/telescope.nvim', branch = '0.1.x', + dependencies = { + {'nvim-lua/plenary.nvim'} + }, + cmd = { "Telescope", "Tel" }, -- lazy loads on these commands + keys = { "f" }, -- lazy loads on this pattern +} + +function M.config() + local telescope = require("telescope") + telescope.setup({}) + + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'ff', builtin.find_files, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + vim.keymap.set('n', 'fb', builtin.buffers, {}) + vim.keymap.set('n', 'fh', builtin.help_tags, {}) +end + +return M diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index 41a08c3..0000000 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,309 +0,0 @@ --- Automatically generated packer.nvim plugin loader code - -if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then - vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') - return -end - -vim.api.nvim_command('packadd packer.nvim') - -local no_errors, error_msg = pcall(function() - -_G._packer = _G._packer or {} -_G._packer.inside_compile = true - -local time -local profile_info -local should_profile = false -if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end - end -else - time = function(chunk, start) end -end - -local function save_profiles(threshold) - local sorted_times = {} - for chunk_name, time_taken in pairs(profile_info) do - sorted_times[#sorted_times + 1] = {chunk_name, time_taken} - end - table.sort(sorted_times, function(a, b) return a[2] > b[2] end) - local results = {} - for i, elem in ipairs(sorted_times) do - if not threshold or threshold and elem[2] > threshold then - results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' - end - end - if threshold then - table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') - end - - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -time([[Luarocks path setup]], false) -time([[try_loadstring definition]], true) -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) - if not success then - vim.schedule(function() - vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) - end) - end - return result -end - -time([[try_loadstring definition]], false) -time([[Defining packer_plugins]], true) -_G.packer_plugins = { - ["Comment.nvim"] = { - config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" }, - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/Comment.nvim", - url = "https://github.com/numToStr/Comment.nvim" - }, - ["cmp-buffer"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-nvim-lsp"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-nvim-lua"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", - url = "https://github.com/hrsh7th/cmp-nvim-lua" - }, - ["cmp-path"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - cmp_luasnip = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp_luasnip", - url = "https://github.com/saadparwaiz1/cmp_luasnip" - }, - gruvbox = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/gruvbox", - url = "https://github.com/morhetz/gruvbox" - }, - ["lazygit.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/lazygit.nvim", - url = "https://github.com/kdheepak/lazygit.nvim" - }, - ["lualine.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - melange = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/melange", - url = "https://github.com/savq/melange" - }, - minimalist = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/minimalist", - url = "https://github.com/dikiaap/minimalist" - }, - ["neovim-ayu"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/neovim-ayu", - url = "https://github.com/Shatur/neovim-ayu" - }, - nvim = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim", - url = "https://github.com/catppuccin/nvim" - }, - ["nvim-cmp"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-neoclip.lua"] = { - config = { "\27LJ\2\nh\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\20continuous_sync\2\30enable_persistent_history\2\nsetup\fneoclip\frequire\0" }, - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-neoclip.lua", - url = "https://github.com/AckslD/nvim-neoclip.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", - url = "https://github.com/kyazdani42/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["sqlite.lua"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/opt/sqlite.lua", - url = "https://github.com/kkharji/sqlite.lua" - }, - ["srcery-vim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/srcery-vim", - url = "https://github.com/srcery-colors/srcery-vim" - }, - supertab = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/supertab", - url = "https://github.com/ervandew/supertab" - }, - ["telescope-file-browser.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/telescope-file-browser.nvim", - url = "https://github.com/nvim-telescope/telescope-file-browser.nvim" - }, - ["telescope-fzf-native.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - ["tender.vim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/tender.vim", - url = "https://github.com/jacoborus/tender.vim" - }, - ["vim-desert-warm-256"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-desert-warm-256", - url = "https://github.com/rainux/vim-desert-warm-256" - }, - ["vim-deus"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-deus", - url = "https://github.com/ajmwagar/vim-deus" - }, - ["vim-fugitive"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-fugitive", - url = "https://github.com/tpope/vim-fugitive" - }, - ["vim-moonfly-colors"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-moonfly-colors", - url = "https://github.com/bluz71/vim-moonfly-colors" - }, - ["vim-railscasts-theme"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-railscasts-theme", - url = "https://github.com/jpo/vim-railscasts-theme" - }, - ["vim-slime"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-slime", - url = "https://github.com/jpalardy/vim-slime" - }, - ["vim-surround"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-surround", - url = "https://github.com/tpope/vim-surround" - }, - ["vim-virtualenv"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-virtualenv", - url = "https://github.com/jmcantrell/vim-virtualenv" - } -} - -time([[Defining packer_plugins]], false) -local module_lazy_loads = { - ["^sqlite"] = "sqlite.lua" -} -local lazy_load_called = {['packer.load'] = true} -local function lazy_load_module(module_name) - local to_load = {} - if lazy_load_called[module_name] then return nil end - lazy_load_called[module_name] = true - for module_pat, plugin_name in pairs(module_lazy_loads) do - if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then - to_load[#to_load + 1] = plugin_name - end - end - - if #to_load > 0 then - require('packer.load')(to_load, {module = module_name}, _G.packer_plugins) - local loaded_mod = package.loaded[module_name] - if loaded_mod then - return function(modname) return loaded_mod end - end - end -end - -if not vim.g.packer_custom_loader_enabled then - table.insert(package.loaders, 1, lazy_load_module) - vim.g.packer_custom_loader_enabled = true -end - --- Config for: Comment.nvim -time([[Config for Comment.nvim]], true) -try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim") -time([[Config for Comment.nvim]], false) --- Config for: nvim-neoclip.lua -time([[Config for nvim-neoclip.lua]], true) -try_loadstring("\27LJ\2\nh\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\20continuous_sync\2\30enable_persistent_history\2\nsetup\fneoclip\frequire\0", "config", "nvim-neoclip.lua") -time([[Config for nvim-neoclip.lua]], false) - -_G._packer.inside_compile = false -if _G._packer.needs_bufread == true then - vim.cmd("doautocmd BufRead") -end -_G._packer.needs_bufread = false - -if should_profile then save_profiles() end - -end) - -if not no_errors then - error_msg = error_msg:gsub('"', '\\"') - vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') -end