diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000000..5148b2c08ae --- /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 e7f1eec416d..ee5aeacef82 100644 --- a/init.lua +++ b/init.lua @@ -1,43 +1,3 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== - -Kickstart.nvim is *not* a distribution. - -Kickstart.nvim is a template for your own configuration. - The goal is that you can read every line of code, top-to-bottom, understand - what your configuration is doing, and modify it to suit your needs. - - Once you've done that, you should start exploring, configuring and tinkering to - explore Neovim! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example: - - https://learnxinyminutes.com/docs/lua/ - - - And then you can explore or search through `:help lua-guide` - - https://neovim.io/doc/user/lua-guide.html - - -Kickstart Guide: - -I have left several `:help X` comments throughout the init.lua -You should run that command and read that help section for more information. - -In addition, I have some `NOTE:` items throughout the file. -These are for you, the reader to help understand what is happening. Feel free to delete -them once you know what you're doing, but they should serve as a guide for when you -are first encountering a few different constructs in your nvim config. - -I hope you enjoy your Neovim journey, -- TJ - -P.S. You can delete this when you're done too. It's your config now :) ---]] - -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) @@ -83,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({})` @@ -121,7 +85,7 @@ require('lazy').setup({ signs = { add = { text = '+' }, change = { text = '~' }, - delete = { text = '_' }, + delete = { text = '-' }, topdelete = { text = '‾' }, changedelete = { text = '~' }, }, @@ -151,16 +115,32 @@ require('lazy').setup({ end, }, }, - { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', + "ray-x/aurora", + lazy = false, priority = 1000, config = function() - vim.cmd.colorscheme 'onedark' - end, + vim.g.aurora_italic = 1 + vim.g.aurora_transparent = 1 + vim.g.aurora_bold = 1 + 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', @@ -168,7 +148,7 @@ require('lazy').setup({ opts = { options = { icons_enabled = false, - theme = 'onedark', + theme = 'eldritch', component_separators = '|', section_separators = '', }, @@ -186,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. @@ -229,18 +178,46 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) +vim.cmd[[colorscheme eldritch]] + -- [[ Setting options ]] -- See `:help vim.o` -- NOTE: You can change these options as you wish! - +-- -- Set highlight on search vim.o.hlsearch = false +vim.opt.autoread = true + +vim.opt.cursorline = true +vim.opt.cursorlineopt = 'number' + -- Make line numbers default -vim.wo.number = true +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +vim.opt.smartindent = true +vim.opt.autoindent = true + +vim.opt.swapfile = true +vim.opt.backup = false +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.scrolloff = 8 +vim.opt.signcolumn = "yes" + +vim.opt.updatetime = 2000 -- Enable mouse mode vim.o.mouse = 'a' @@ -377,12 +354,19 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = -- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}' vim.defer_fn(function() require('nvim-treesitter.configs').setup { + modules = {}, -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' }, + 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, + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, + -- Languages to ignore installing + ignore_install = { }, + highlight = { enable = true }, indent = { enable = true }, incremental_selection = { @@ -439,6 +423,7 @@ vim.defer_fn(function() }, }, } + vim.treesitter.language.register("bash", "PKGBUILD") end, 0) -- [[ Configure LSP ]] @@ -511,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 = { - -- clangd = {}, + asm_lsp = {}, + bashls = {}, + clangd = {}, + clojure_lsp = {}, + omnisharp = {}, -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, @@ -519,6 +508,8 @@ local servers = { -- html = { filetypes = { 'html', 'twig', 'hbs'} }, lua_ls = { + config = { + }; Lua = { workspace = { checkThirdParty = false }, telemetry = { enable = false }, @@ -604,5 +595,4 @@ cmp.setup { }, } --- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..9dfb954cad1 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,37 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "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" }, + "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": "dde00106b9094f101980b364fae02fd85d357306" }, + "neorg": { "branch": "main", "commit": "81ee90cb2d72ac43bfadb7dd276646f34c8f85be" }, + "nnn.nvim": { "branch": "master", "commit": "4616ec65eb0370af548e356c3ec542c1b167b415" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lspconfig": { "branch": "master", "commit": "e47ccfae775f0d572ef0f3a7d245f043b259dafc" }, + "nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" }, + "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": "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 00000000000..0ce0b92dca6 --- /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 00000000000..55637bd98a0 --- /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 be0eb9d8d7a..00000000000 --- a/lua/custom/plugins/init.lua +++ /dev/null @@ -1,5 +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 {} diff --git a/lua/custom/plugins/neorg.lua b/lua/custom/plugins/neorg.lua new file mode 100644 index 00000000000..b508c6a2355 --- /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 00000000000..2aa28051710 --- /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 00000000000..b44629d779f --- /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 00000000000..93ae909675c --- /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 00000000000..29fdcca0f95 --- /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', +}