From 6fe9d1b656887b734b92c5e05a910ca7acc65ed0 Mon Sep 17 00:00:00 2001 From: NotAI Date: Sun, 8 Dec 2024 14:20:27 -0500 Subject: [PATCH] plugin revamp --- TODO.md | 22 ++++++++++ init.lua | 68 +++++++++++++----------------- lazy-lock.json | 27 ++++++++---- lua/custom/plugins/conjure.lua | 25 +++++++++++ lua/custom/plugins/filebrowser.lua | 10 +++++ lua/custom/plugins/init.lua | 12 ------ lua/custom/plugins/neorg.lua | 28 ++++++++++++ lua/custom/plugins/obsidian.lua | 16 +++++++ lua/custom/plugins/telescope.lua | 29 +++++++++++++ lua/custom/plugins/tmux.lua | 20 +++++++++ lua/custom/plugins/treesitter.lua | 26 ++++++++++++ 11 files changed, 224 insertions(+), 59 deletions(-) create mode 100644 TODO.md create mode 100644 lua/custom/plugins/conjure.lua create mode 100644 lua/custom/plugins/filebrowser.lua delete mode 100644 lua/custom/plugins/init.lua create mode 100644 lua/custom/plugins/neorg.lua create mode 100644 lua/custom/plugins/obsidian.lua create mode 100644 lua/custom/plugins/telescope.lua create mode 100644 lua/custom/plugins/tmux.lua create mode 100644 lua/custom/plugins/treesitter.lua diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000..5148b2c0 --- /dev/null +++ b/TODO.md @@ -0,0 +1,22 @@ + +- Telescope +- Mason + +# Git Workflow +- LazyGit +- NeoGit +- Diffview +- GitSigns +- Git Worktree + +# Visuals +- Zenmode +- Twlight +- Lualine + +# Integrated Shell + +# Dev containers +Neovim Dev Containers +Neovim remote access +Neovim dev in browser diff --git a/init.lua b/init.lua index f5358067..ee5aeace 100644 --- a/init.lua +++ b/init.lua @@ -43,8 +43,12 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', + { 'williamboman/mason.nvim', opts = { ensure_installed = { "clangd" } } }, + { + 'williamboman/mason-lspconfig.nvim', + config = function() + end, + }, -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` @@ -119,9 +123,24 @@ require('lazy').setup({ vim.g.aurora_italic = 1 vim.g.aurora_transparent = 1 vim.g.aurora_bold = 1 - vim.cmd.colorscheme 'aurora' end }, + { + "eldritch-theme/eldritch.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + terminal_colors = true, + styles = { + sidebars = "transparent", + floats = "transparent", + }, + lualine_bold = true, + on_colors = function(colors) end, + on_highlights = function(highlights, colors) end, + }, + }, { -- Set lualine as statusline 'nvim-lualine/lualine.nvim', @@ -129,7 +148,7 @@ require('lazy').setup({ opts = { options = { icons_enabled = false, - theme = 'aurora', + theme = 'eldritch', component_separators = '|', section_separators = '', }, @@ -147,37 +166,6 @@ require('lazy').setup({ -- "gc" to comment visual regions/lines { 'numToStr/Comment.nvim', opts = {} }, - - -- Fuzzy Finder (files, lsp, etc) - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - 'nvim-lua/plenary.nvim', - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - -- Only load if `make` is available. Make sure you have the system - -- requirements installed. - { - 'nvim-telescope/telescope-fzf-native.nvim', - -- NOTE: If you are having trouble with this installation, - -- refer to the README for telescope-fzf-native for more instructions. - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - end, - }, - }, - }, - - { - -- Highlight, edit, and navigate code - 'nvim-treesitter/nvim-treesitter', - dependencies = { - 'nvim-treesitter/nvim-treesitter-textobjects', - }, - build = ':TSUpdate', - }, - -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them. @@ -193,6 +181,8 @@ require('lazy').setup({ { import = 'custom.plugins' }, }, {}) +vim.cmd[[colorscheme eldritch]] + -- [[ Setting options ]] -- See `:help vim.o` -- NOTE: You can change these options as you wish! @@ -229,8 +219,6 @@ vim.opt.signcolumn = "yes" vim.opt.updatetime = 2000 -vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = 'white' }) - -- Enable mouse mode vim.o.mouse = 'a' @@ -368,7 +356,7 @@ vim.defer_fn(function() require('nvim-treesitter.configs').setup { modules = {}, -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'bash', 'c', 'csv', 'diff', 'elvish', 'git_config', 'git_rebase', 'gitattributes', 'gitcommit', 'gitignore', 'jsonc', 'kconfig', 'lua', 'make', 'markdown', 'query', 'regex', 'toml', 'udev', 'vim', 'vimdoc', 'xml', 'yaml' }, + ensure_installed = { 'bash', 'c', 'cpp', 'csv', 'diff', 'elvish', 'git_config', 'git_rebase', 'gitattributes', 'gitcommit', 'gitignore', 'jsonc', 'kconfig', 'lua', 'make', 'markdown', 'query', 'regex', 'toml', 'udev', 'vim', 'vimdoc', 'xml', 'yaml' }, -- Download languages from ensure_installed synchronously sync_install = false, @@ -508,7 +496,11 @@ require('mason-lspconfig').setup() -- If you want to override the default filetypes that your language server will attach to you can -- define the property 'filetypes' to the map in question. local servers = { + asm_lsp = {}, + bashls = {}, clangd = {}, + clojure_lsp = {}, + omnisharp = {}, -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, diff --git a/lazy-lock.json b/lazy-lock.json index 6fa66084..9dfb954c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,28 +1,37 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "2f0db89fcb22d27b908b3609d2441c02798106ab" }, + "LuaSnip": { "branch": "master", "commit": "82108e7e31cc6fc223cc5df5cae6d89f70bb199f" }, "aurora": { "branch": "master", "commit": "6157dffe86f20d891df723c0c6734676295b01e0" }, + "cmp-conjure": { "branch": "master", "commit": "8c9a88efedc0e5bf3165baa6af8a407afe29daf6" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "a4a7edfea37e557dbff5509ee374ffb57051bba9" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "gitsigns.nvim": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3c8a185da4b8ab7aef487219f5e001b11d4b6aaf" }, + "conjure": { "branch": "master", "commit": "6d2bc7f7b24c2c43d54f263bee7b9b08aef5d1a1" }, + "eldritch.nvim": { "branch": "master", "commit": "48788ef2f7be7e86b0a57ef87f1a96bc18e24b8b" }, + "fidget.nvim": { "branch": "main", "commit": "3a93300c076109d86c7ce35ec67a8034ae6ba9db" }, + "friendly-snippets": { "branch": "main", "commit": "69a2c1675b66e002799f5eef803b87a12f593049" }, + "gitsigns.nvim": { "branch": "main", "commit": "4aaacbf5e5e2218fd05eb75703fe9e0f85335803" }, + "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" }, "mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" }, - "neodev.nvim": { "branch": "main", "commit": "be8d4d4cab6c13c6a572269c9d6a63774baba9a0" }, + "neodev.nvim": { "branch": "main", "commit": "dde00106b9094f101980b364fae02fd85d357306" }, + "neorg": { "branch": "main", "commit": "81ee90cb2d72ac43bfadb7dd276646f34c8f85be" }, + "nnn.nvim": { "branch": "master", "commit": "4616ec65eb0370af548e356c3ec542c1b167b415" }, "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" }, + "nvim-lspconfig": { "branch": "master", "commit": "e47ccfae775f0d572ef0f3a7d245f043b259dafc" }, "nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "85b9d0cbd4ff901abcda862b50dbb34e0901848b" }, + "nvim-treesitter-context": { "branch": "master", "commit": "400a99ad43ac78af1148061da3491cba2637ad29" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "a97a6ea140cbe5e0f7ab1291c7ca70abd5171d31" }, + "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, + "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "4bd5657b14b58e069287f5ac591a647bb860b2ed" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "6f735a63dc24b9aed527cd505a31864223c8a6d8" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/custom/plugins/conjure.lua b/lua/custom/plugins/conjure.lua new file mode 100644 index 00000000..0ce0b92d --- /dev/null +++ b/lua/custom/plugins/conjure.lua @@ -0,0 +1,25 @@ +return { + { + "Olical/conjure", + ft = { "clojure", "fennel", "janet", "racket", "hy", "scheme", "common lisp", "julia", "rust", "lua", "python" }, + lazy = true, + init = function() + vim.g['conjure#extract#tree_sitter#enabled'] = true + end, + dependencies = { + "PaterJason/cmp-conjure", + "nvim-treesitter/nvim-treesitter", + }, + }, + { + "PaterJason/cmp-conjure", + lazy = true, + dependencies = { "nvim-cmp" }, + config = function() + local cmp = require("cmp") + local cfg = cmp.get_config() + table.insert(cfg.sources, { name = "conjure" }) + return cmp.setup(cfg) + end, + } +} diff --git a/lua/custom/plugins/filebrowser.lua b/lua/custom/plugins/filebrowser.lua new file mode 100644 index 00000000..55637bd9 --- /dev/null +++ b/lua/custom/plugins/filebrowser.lua @@ -0,0 +1,10 @@ +return { + { + 'luukvbaal/nnn.nvim', + config = function () + require("nnn").setup({ + replace_netrw = "explorer" + }) + end + } +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua deleted file mode 100644 index 9ab9ce1a..00000000 --- a/lua/custom/plugins/init.lua +++ /dev/null @@ -1,12 +0,0 @@ --- You can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information -return { - { - "nvim-telescope/telescope-file-browser.nvim", - dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" } - }; -} - --- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/neorg.lua b/lua/custom/plugins/neorg.lua new file mode 100644 index 00000000..b508c6a2 --- /dev/null +++ b/lua/custom/plugins/neorg.lua @@ -0,0 +1,28 @@ +return { + { + "nvim-neorg/neorg", + version = "*", + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + opts = { + load = { + ["core.defaults"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + general = "$XDG_DOCUMENTS_DIR/neorg/general", + }, + default_workspace = "general", + }, + }, + }, + }, + config = function() + vim.wo.foldlevel = 99 + vim.wo.conceallevel = 2 + end, + } +} diff --git a/lua/custom/plugins/obsidian.lua b/lua/custom/plugins/obsidian.lua new file mode 100644 index 00000000..2aa28051 --- /dev/null +++ b/lua/custom/plugins/obsidian.lua @@ -0,0 +1,16 @@ +return { + 'epwalsh/obsidian.nvim', + version = "*", + lazy = true, + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: + event = { + -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. + -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" + -- refer to `:h file-pattern` for more examples + "BufReadPre $XDG_DOCUMENTS_DIR/obsidian/*/*.md", + "BufNewFile $XDG_DOCUMENTS_DIR/obsidian/*/*.md", + }, + dependencies = { + 'nvim-lua/plenary.nvim' + }, +} diff --git a/lua/custom/plugins/telescope.lua b/lua/custom/plugins/telescope.lua new file mode 100644 index 00000000..b44629d7 --- /dev/null +++ b/lua/custom/plugins/telescope.lua @@ -0,0 +1,29 @@ +-- You can add your own plugins here or in other files in this directory! +-- I promise not to create any merge conflicts in this directory :) +-- +-- See the kickstart.nvim README for more information +return { + { + 'nvim-telescope/telescope.nvim', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + { + 'nvim-telescope/telescope-fzf-native.nvim', + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, + }, + }, + { + 'nvim-telescope/telescope-file-browser.nvim', + dependencies = { + 'nvim-telescope/telescope.nvim', + 'nvim-lua/plenary.nvim' + } + }; +} + +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/tmux.lua b/lua/custom/plugins/tmux.lua new file mode 100644 index 00000000..93ae9096 --- /dev/null +++ b/lua/custom/plugins/tmux.lua @@ -0,0 +1,20 @@ +return { + { + "christoomey/vim-tmux-navigator", + lazy = false, + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious" + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, + }, +} diff --git a/lua/custom/plugins/treesitter.lua b/lua/custom/plugins/treesitter.lua new file mode 100644 index 00000000..29fdcca0 --- /dev/null +++ b/lua/custom/plugins/treesitter.lua @@ -0,0 +1,26 @@ +return { + { + 'nvim-treesitter/nvim-treesitter', + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', + }, + build = ':TSUpdate', + opts = { + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + }, + config = function(_, opts) + require('nvim-treesitter.configs').setup(opts) + end, + }, + { + 'nvim-treesitter/playground', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + }, + }, + 'nvim-treesitter/nvim-treesitter-context', +}