├── .gitignore ├── .tmux.conf ├── init.lua ├── lazy-lock.json └── lua └── core ├── keymaps.lua ├── options.lua ├── plugin_config ├── colorscheme.lua ├── completions.lua ├── copilot.lua ├── dap_config.lua ├── gitsigns.lua ├── init.lua ├── lsp_config.lua ├── lualine.lua ├── markdown_preview.lua ├── mason.lua ├── nvimtree_config.lua ├── oil.lua ├── rust_config.lua ├── swagger-preview.lua ├── telescope.lua ├── treesitter.lua └── vim-test.lua └── plugins.lua /.gitignore: -------------------------------------------------------------------------------- 1 | plugin/ 2 | -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | unbind r 2 | bind r source-file ~/.tmux.conf 3 | 4 | set -g prefix C-s 5 | 6 | # act like vim 7 | setw -g mode-keys vi 8 | bind-key h select-pane -L 9 | bind-key j select-pane -D 10 | bind-key k select-pane -U 11 | bind-key l select-pane -R 12 | 13 | # List of plugins 14 | set -g @plugin 'tmux-plugins/tpm' 15 | set -g @plugin 'dracula/tmux' 16 | 17 | set -g @dracula-show-powerline true 18 | set -g @dracula-fixed-location "NYC" 19 | set -g @dracula-plugins "weather" 20 | set -g @dracula-show-flags true 21 | set -g @dracula-show-left-icon session 22 | set -g status-position top 23 | 24 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 25 | run '~/.tmux/plugins/tpm/tpm' 26 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | vim.g.loaded_netrw = 1 2 | vim.g.loaded_netrwPlugin = 1 3 | 4 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 5 | if not vim.loop.fs_stat(lazypath) then 6 | vim.fn.system({ 7 | "git", 8 | "clone", 9 | "--filter=blob:none", 10 | "https://github.com/folke/lazy.nvim.git", 11 | "--branch=stable", -- latest stable release 12 | lazypath, 13 | }) 14 | end 15 | vim.opt.rtp:prepend(lazypath) 16 | 17 | 18 | require("core.options") 19 | require("core.keymaps") 20 | require("core.plugins") 21 | require("core.plugin_config") 22 | -------------------------------------------------------------------------------- /lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" }, 3 | "catppuccin": { "branch": "main", "commit": "988c0b2dde4140572ed37c6b8b5d5deac0219f9f" }, 4 | "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, 5 | "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, 6 | "copilot.vim": { "branch": "release", "commit": "2c31989063b145830d5f0bea8ab529d2aef2427b" }, 7 | "emmet-vim": { "branch": "master", "commit": "def5d57a1ae5afb1b96ebe83c4652d1c03640f4d" }, 8 | "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, 9 | "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" }, 10 | "gruvbox.nvim": { "branch": "main", "commit": "0940564208a490c173216c3b7d2188b0a5ad3491" }, 11 | "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, 12 | "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, 13 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 14 | "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, 15 | "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, 16 | "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, 17 | "nvim-lspconfig": { "branch": "master", "commit": "cf3dd4a290084a868fac0e2e876039321d57111c" }, 18 | "nvim-tree.lua": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" }, 19 | "nvim-treesitter": { "branch": "master", "commit": "c203884c80ef31b6a3993398734fbe008addcb27" }, 20 | "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, 21 | "oil.nvim": { "branch": "master", "commit": "82834573bbca27c240f30087ff642b807ed1872a" }, 22 | "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, 23 | "swagger-preview.nvim": { "branch": "master", "commit": "4e1db32e7934c57d653846d5d297f7ea9ddb6ee8" }, 24 | "telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }, 25 | "vim": { "branch": "master", "commit": "6495b4ff40479ec7705addb4ea800ec308026648" }, 26 | "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, 27 | "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, 28 | "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, 29 | "vim-test": { "branch": "master", "commit": "84373ffca386edd667e09f2bf1024b1de7bdfdf1" }, 30 | "vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" }, 31 | "vimux": { "branch": "master", "commit": "616fcb4799674a7a809b14ca2dc155bb6ba25788" } 32 | } -------------------------------------------------------------------------------- /lua/core/keymaps.lua: -------------------------------------------------------------------------------- 1 | -- Navigate vim panes better 2 | vim.keymap.set('n', '', ':wincmd k') 3 | vim.keymap.set('n', '', ':wincmd j') 4 | vim.keymap.set('n', '', ':wincmd h') 5 | vim.keymap.set('n', '', ':wincmd l') 6 | 7 | vim.keymap.set('n', 'h', ':nohlsearch') -------------------------------------------------------------------------------- /lua/core/options.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = ' ' 2 | vim.g.maplocalleader = ' ' 3 | 4 | vim.opt.backspace = '2' 5 | vim.opt.showcmd = true 6 | vim.opt.laststatus = 2 7 | vim.opt.autowrite = true 8 | vim.opt.cursorline = true 9 | vim.opt.autoread = true 10 | 11 | -- use spaces for tabs and whatnot 12 | vim.opt.tabstop = 2 13 | vim.opt.shiftwidth = 2 14 | vim.opt.shiftround = true 15 | vim.opt.expandtab = true 16 | 17 | vim.cmd [[ set noswapfile ]] 18 | vim.cmd [[ set termguicolors ]] 19 | 20 | --Line numbers 21 | vim.wo.number = true 22 | -------------------------------------------------------------------------------- /lua/core/plugin_config/colorscheme.lua: -------------------------------------------------------------------------------- 1 | require("catppuccin").setup({ 2 | flavour = "mocha", 3 | transparent_background = true, 4 | styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): 5 | comments = { "italic" }, -- Change the style of comments 6 | }, 7 | }) 8 | 9 | vim.o.termguicolors = true 10 | vim.o.background = "dark" 11 | vim.cmd[[colorscheme catppuccin]] 12 | -------------------------------------------------------------------------------- /lua/core/plugin_config/completions.lua: -------------------------------------------------------------------------------- 1 | local cmp = require("cmp") 2 | 3 | require("luasnip.loaders.from_vscode").lazy_load() 4 | 5 | cmp.setup({ 6 | mapping = cmp.mapping.preset.insert({ 7 | [''] = cmp.mapping.scroll_docs(-4), 8 | [''] = cmp.mapping.scroll_docs(4), 9 | [''] = cmp.mapping.complete(), 10 | [''] = cmp.mapping.abort(), 11 | [''] = cmp.mapping.confirm({ select = true }), 12 | }), 13 | snippet = { 14 | expand = function(args) 15 | require('luasnip').lsp_expand(args.body) 16 | end, 17 | }, 18 | sources = cmp.config.sources({ 19 | { name = 'nvim_lsp' }, 20 | { name = 'luasnip' }, 21 | }, { 22 | { name = 'buffer' }, 23 | }), 24 | }) 25 | -------------------------------------------------------------------------------- /lua/core/plugin_config/copilot.lua: -------------------------------------------------------------------------------- 1 | vim.cmd[[highlight CopilotSuggestion ctermfg=8 guifg=white guibg=#5c6370]] 2 | -------------------------------------------------------------------------------- /lua/core/plugin_config/dap_config.lua: -------------------------------------------------------------------------------- 1 | require("dapui").setup() 2 | 3 | local dap, dapui = require("dap"), require("dapui") 4 | 5 | dap.listeners.after.event_initialized["dapui_config"] = function() 6 | dapui.open() 7 | end 8 | dap.listeners.before.event_terminated["dapui_config"] = function() 9 | dapui.close() 10 | end 11 | dap.listeners.before.event_exited["dapui_config"] = function() 12 | dapui.close() 13 | end 14 | 15 | vim.keymap.set("n", "dt", ':DapToggleBreakpoint') 16 | vim.keymap.set("n", "dx", ':DapTerminate') 17 | vim.keymap.set("n", "do", ':DapStepOver') 18 | -------------------------------------------------------------------------------- /lua/core/plugin_config/gitsigns.lua: -------------------------------------------------------------------------------- 1 | require('gitsigns').setup() 2 | -------------------------------------------------------------------------------- /lua/core/plugin_config/init.lua: -------------------------------------------------------------------------------- 1 | require("core.plugin_config.colorscheme") 2 | require("core.plugin_config.lualine") 3 | require("core.plugin_config.treesitter") 4 | require("core.plugin_config.telescope") 5 | require("core.plugin_config.vim-test") 6 | require("core.plugin_config.completions") 7 | require("core.plugin_config.mason") 8 | require("core.plugin_config.lsp_config") 9 | require("core.plugin_config.gitsigns") 10 | require("core.plugin_config.copilot") 11 | require("core.plugin_config.oil") 12 | require("core.plugin_config.markdown_preview") 13 | require("core.plugin_config.swagger-preview") 14 | require("core.plugin_config.nvimtree_config") 15 | -------------------------------------------------------------------------------- /lua/core/plugin_config/lsp_config.lua: -------------------------------------------------------------------------------- 1 | require("mason-lspconfig").setup({ 2 | ensure_installed = { "lua_ls", "solargraph", "tsserver" } 3 | }) 4 | 5 | local lspconfig = require('lspconfig') 6 | 7 | local lsp_defaults = lspconfig.util.default_config 8 | 9 | lsp_defaults.capabilities = vim.tbl_deep_extend( 10 | 'force', 11 | lsp_defaults.capabilities, 12 | require('cmp_nvim_lsp').default_capabilities() 13 | ) 14 | 15 | require("lspconfig").lua_ls.setup { 16 | settings = { 17 | Lua = { 18 | diagnostics = { 19 | globals = { "vim" }, 20 | }, 21 | workspace = { 22 | library = { 23 | [vim.fn.expand "$VIMRUNTIME/lua"] = true, 24 | [vim.fn.stdpath "config" .. "/lua"] = true, 25 | }, 26 | }, 27 | }, 28 | } 29 | } 30 | 31 | require("lspconfig").solargraph.setup({}) 32 | require("lspconfig").tsserver.setup({}) 33 | require("lspconfig").gopls.setup({}) 34 | require("lspconfig").tailwindcss.setup({}) 35 | 36 | vim.api.nvim_create_autocmd('LspAttach', { 37 | group = vim.api.nvim_create_augroup('UserLspConfig', {}), 38 | callback = function(ev) 39 | -- Enable completion triggered by 40 | vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' 41 | 42 | -- Buffer local mappings. 43 | -- See `:help vim.lsp.*` for documentation on any of the below functions 44 | local opts = { buffer = ev.buf } 45 | vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) 46 | vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) 47 | vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) 48 | vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) 49 | vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) 50 | vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) 51 | vim.keymap.set('n', 'wl', function() 52 | print(vim.inspect(vim.lsp.buf.list_workspace_folders())) 53 | end, opts) 54 | vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) 55 | vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) 56 | vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) 57 | vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) 58 | vim.keymap.set('n', 'f', function() 59 | vim.lsp.buf.format { async = true } 60 | end, opts) 61 | end, 62 | }) 63 | -------------------------------------------------------------------------------- /lua/core/plugin_config/lualine.lua: -------------------------------------------------------------------------------- 1 | require('lualine').setup { 2 | options = { 3 | icons_enabled = true, 4 | theme = 'nightfly', 5 | }, 6 | sections = { 7 | lualine_a = { 8 | { 9 | 'filename', 10 | path = 1, 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lua/core/plugin_config/markdown_preview.lua: -------------------------------------------------------------------------------- 1 | vim.cmd [[ 2 | let g:mkdp_theme = 'light' 3 | let g:mkdp_command_for_global = 1 4 | ]] 5 | -------------------------------------------------------------------------------- /lua/core/plugin_config/mason.lua: -------------------------------------------------------------------------------- 1 | require("mason").setup() 2 | -------------------------------------------------------------------------------- /lua/core/plugin_config/nvimtree_config.lua: -------------------------------------------------------------------------------- 1 | require("nvim-tree").setup({ 2 | sort_by = "case_sensitive", 3 | view = { 4 | width = 30, 5 | }, 6 | renderer = { 7 | group_empty = true, 8 | }, 9 | filters = { 10 | dotfiles = true, 11 | }, 12 | }) 13 | 14 | vim.keymap.set('n', '', ':NvimTreeFindFile') 15 | -------------------------------------------------------------------------------- /lua/core/plugin_config/oil.lua: -------------------------------------------------------------------------------- 1 | require("oil").setup() 2 | vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" }) 3 | -------------------------------------------------------------------------------- /lua/core/plugin_config/rust_config.lua: -------------------------------------------------------------------------------- 1 | local rt = require("rust-tools") 2 | local mason_registry = require("mason-registry") 3 | 4 | local codelldb = mason_registry.get_package("codelldb") 5 | local extension_path = codelldb:get_install_path() .. "/extension/" 6 | local codelldb_path = extension_path .. "adapter/codelldb" 7 | local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib" 8 | 9 | rt.setup({ 10 | dap = { 11 | adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path), 12 | }, 13 | server = { 14 | capabilities = require("cmp_nvim_lsp").default_capabilities(), 15 | on_attach = function(_, bufnr) 16 | vim.keymap.set("n", "k", rt.hover_actions.hover_actions, { buffer = bufnr }) 17 | vim.keymap.set("n", "a", rt.code_action_group.code_action_group, { buffer = bufnr }) 18 | end, 19 | }, 20 | tools = { 21 | hover_actions = { 22 | auto_focus = true, 23 | }, 24 | }, 25 | }) 26 | -------------------------------------------------------------------------------- /lua/core/plugin_config/swagger-preview.lua: -------------------------------------------------------------------------------- 1 | require("swagger-preview").setup({ 2 | -- The port to run the preview server on 3 | port = 8000, 4 | -- The host to run the preview server on 5 | host = "localhost", 6 | }) 7 | -------------------------------------------------------------------------------- /lua/core/plugin_config/telescope.lua: -------------------------------------------------------------------------------- 1 | require('telescope').setup({ file_ignore_patterns = { "node%_modules/.*" } }) 2 | local builtin = require('telescope.builtin') 3 | 4 | vim.keymap.set('n', '', builtin.find_files, {}) 5 | vim.keymap.set('n', '', builtin.oldfiles, {}) 6 | vim.keymap.set('n', 'fg', builtin.live_grep, {}) 7 | vim.keymap.set('n', 'fh', builtin.help_tags, {}) 8 | -------------------------------------------------------------------------------- /lua/core/plugin_config/treesitter.lua: -------------------------------------------------------------------------------- 1 | require'nvim-treesitter.configs'.setup { 2 | -- A list of parser names, or "all" 3 | ensure_installed = { "c", "lua", "rust", "ruby", "vim", "html" }, 4 | 5 | -- Install parsers synchronously (only applied to `ensure_installed`) 6 | sync_install = false, 7 | auto_install = true, 8 | highlight = { 9 | enable = true, 10 | }, 11 | indent = { 12 | enable = true, 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /lua/core/plugin_config/vim-test.lua: -------------------------------------------------------------------------------- 1 | vim.cmd [[ 2 | let test#strategy = "vimux" 3 | ]] 4 | 5 | vim.keymap.set('n', 't', ':TestNearest') 6 | vim.keymap.set('n', 'T', ':TestFile') 7 | -------------------------------------------------------------------------------- /lua/core/plugins.lua: -------------------------------------------------------------------------------- 1 | require("lazy").setup({ 2 | { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, 3 | "tpope/vim-commentary", 4 | "mattn/emmet-vim", 5 | "nvim-tree/nvim-tree.lua", 6 | "nvim-tree/nvim-web-devicons", 7 | "ellisonleao/gruvbox.nvim", 8 | "dracula/vim", 9 | "nvim-lualine/lualine.nvim", 10 | "nvim-treesitter/nvim-treesitter", 11 | "vim-test/vim-test", 12 | "lewis6991/gitsigns.nvim", 13 | "preservim/vimux", 14 | "christoomey/vim-tmux-navigator", 15 | "tpope/vim-fugitive", 16 | "tpope/vim-surround", 17 | "stevearc/oil.nvim", 18 | -- completion 19 | "hrsh7th/nvim-cmp", 20 | "hrsh7th/cmp-nvim-lsp", 21 | "L3MON4D3/LuaSnip", 22 | "saadparwaiz1/cmp_luasnip", 23 | "rafamadriz/friendly-snippets", 24 | "github/copilot.vim", 25 | "williamboman/mason.nvim", 26 | "williamboman/mason-lspconfig.nvim", 27 | "neovim/nvim-lspconfig", 28 | { 29 | "vinnymeller/swagger-preview.nvim", 30 | run = "npm install -g swagger-ui-watcher", 31 | }, 32 | { 33 | "iamcco/markdown-preview.nvim", 34 | run = "cd app && npm install", 35 | }, 36 | { 37 | "nvim-telescope/telescope.nvim", tag = "0.1.4", 38 | dependencies = { "nvim-lua/plenary.nvim" } 39 | }, 40 | }) 41 | --------------------------------------------------------------------------------