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", "https://github.com/folke/lazy.nvim.git", "--branch=stable", -- latest stable release lazypath, }) end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ -- Color schemes. Lazy, only selected will be loaded. -- ------------------------------------------------------------------------- { 'sainnhe/gruvbox-material', config = function(_) vim.g.gruvbox_material_palette = 'material' vim.g.gruvbox_material_background = 'hard' vim.g.gruvbox_material_enable_bold = 1 end }, { 'rebelot/kanagawa.nvim', lazy = true, }, { 'marko-cerovac/material.nvim', lazy = true, opts = { italics = { comments = true, }, plugins = { neogit = false, sidebar_nvim = false, lsp_saga = false, nvim_dap = false, nvim_navic = false, hop = false, } } }, { 'EdenEast/nightfox.nvim', build = ':NightfoxCompile', lazy = true, opts = { options = { styles = { comments = "italic", keywords = "bold", } } } }, -- Common dependency for Lua plugins -- ------------------------------------------------------------------------- 'nvim-lua/plenary.nvim', -- Common dependency for many plugins (visual) -- ------------------------------------------------------------------------- 'nvim-tree/nvim-web-devicons', { "folke/which-key.nvim", config = function() require("which-key").setup({ -- customize as desired }) end, }, -- Fuzzy finder (files, buffers, live grep, etc.) -- Includes a native build based on FZF for performance. -- ------------------------------------------------------------------------- { 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, keys = { { ';', 'Telescope buffers', desc = 'Find Buffer' }, { '', 'Telescope find_files', desc = 'Find File' }, { 'fg', 'Telescope live_grep', desc = 'Live Grep' }, { 'fm', 'Telescope metals commands', desc = 'Find Metals Command' }, { 'ft', 'TodoTelescope', desc = 'Find TODO' }, } }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build', config = function(_) require('telescope').load_extension('fzf') end }, -- A pretty list for showing diagnostics, references, telescope results, -- quickfix and location lists to help you solve all the trouble your code -- is causing. -- ------------------------------------------------------------------------- { 'folke/trouble.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, keys = { { 'xx', 'TroubleToggle', desc = 'Trouble' }, { 'xw', 'TroubleToggle workspace_diagnostics', desc = 'Workspace Diagnostics' }, { 'xd', 'TroubleToggle document_diagnostics', desc = 'Document Diagnostics' }, { 'xq', 'TroubleToggle quickfix', desc = 'Quickfix' }, { 'xl', 'TroubleToggle loclist', desc = 'Local List' }, { 'xr', 'TroubleToggle lsp_references', desc = 'LSP References' }, { 'xr', 'TodoTrouble', desc = 'Show TODOs' }, } }, -- Treesitter: Neovim bindings for the Tree-sitter parser generator tool and -- incremental parsing library. -- ------------------------------------------------------------------------- { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, -- Neovim-native LSP Implementation -- -- Some languages are supported elsewhere via plugins that know how to -- initialize neovim-lsp under the covers: -- - rust (rustaceanvim) -- ------------------------------------------------------------------------- { 'neovim/nvim-lspconfig', dependencies = { 'hrsh7th/cmp-nvim-lsp', }, config = function(_) local lsp = require('lspconfig') -- Establish a set of capabilities so we can advertise nvim-cmp support. local capabilities = vim.lsp.protocol.make_client_capabilities() -- Add nvim-cmp support to the capabilities. capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) -- lua-language-server lsp.lua_ls.setup { settings = { Lua = { runtime = { -- Tell the language server which version of Lua you're using (most -- likely LuaJIT in the case of Neovim) version = 'LuaJIT', }, diagnostics = { -- Get the language server to recognize the `vim` global globals = {'vim'}, }, workspace = { -- Make the server aware of Neovim runtime files library = vim.api.nvim_get_runtime_file("", true), }, -- Do not send telemetry data containing a randomized but unique -- identifier telemetry = { enable = false, }, }, }, } -- bash-language-server lsp.bashls.setup{} -- texlab = latex language server lsp.texlab.setup{} -- terraform-ls = terraform language server (Hashicorp stable) lsp.terraformls.setup{} -- tsserver = typescript language server, works for JS as well. lsp.tsserver.setup{} -- gopls = go language server lsp.gopls.setup({ settings = { gopls = { analyses = { unusedparams = true, }, staticcheck = true, gofumpt = true, }, }, }) end }, -- nvim-cmp - completion plugin, used for LSP and Metals -- ------------------------------------------------------------------------- { 'hrsh7th/nvim-cmp', dependencies = { 'L3MON4D3/LuaSnip', 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', 'hrsh7th/cmp-buffer', 'saadparwaiz1/cmp_luasnip' }, config = function(_) local cmp = require('cmp') cmp.setup{ snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end, }, sources = { { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' }, { name = 'buffer', option = { keyword_length = 5 }, }, }, mapping = { [''] = cmp.mapping.confirm({ select = true }), [''] = cmp.mapping.complete(), [''] = function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end, [''] = function(fallback) if cmp.visible() then cmp.select_prev_item() else fallback() end end, }, } end }, -- Metals, for Scala development. -- ------------------------------------------------------------------------- { 'scalameta/nvim-metals', dependencies = { 'nvim-lua/plenary.nvim' } }, -- Lualine (configures the bottom bars) -- ------------------------------------------------------------------------- { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, }, -- bufferline - shows a bar at the top with open buffers -- ------------------------------------------------------------------------- { 'akinsho/bufferline.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, opts = { options = { mode = 'buffers', indicator = { style = 'none' }, diagnostics = 'nvim_lsp', color_icons = true, show_buffer_icons = true, show_buffer_close_icons = false, separator_style = 'slant', always_show_bufferline = true, hover = { enabled = false }, }, } }, -- Floating terminal -- ------------------------------------------------------------------------- { 'voldikss/vim-floaterm', keys = { { 'tc', 'FloatermNew', desc = 'New Floating Terminal' }, { 'tc', 'FloatermNew', mode = 't', desc = 'New Floating Terminal' }, { 'tt', 'FloatermToggle', desc = 'Toggle Floating Terminal' }, { 'tt', 'FloatermToggle', mode = 't', desc = 'Toggle Floating Terminal' }, { 'tp', 'FloatermPrev', desc = 'Previous Terminal' }, { 'tp', 'FloatermPrev', mode = 't', desc = 'Previous Terminal' }, { 'tn', 'FloatermNext', desc = 'Next Terminal' }, { 'tn', 'FloatermNext', mode = 't', desc = 'Next Terminal' }, }, config = function(_) vim.g.floaterm_width = 0.8 vim.g.floaterm_height = 0.8 vim.g.floaterm_gitcommit = 'split' end }, -- Show signs for Git -- ------------------------------------------------------------------------- { 'lewis6991/gitsigns.nvim' }, -- Show unobtrusive indentation guides -- ------------------------------------------------------------------------- { 'lukas-reineke/indent-blankline.nvim', }, -- nvim-tree for when I want to view files -- ------------------------------------------------------------------------- { 'nvim-tree/nvim-tree.lua', dependencies = { 'nvim-tree/nvim-web-devicons' }, tag = 'nightly', lazy = false, keys = { { 'tt', 'NvimTreeToggle', desc = 'File Tree' }, { 'tf', 'NvimTreeFindFile', desc = 'Tree Find File' }, }, config = function(_) require('nvim-tree').setup() end }, -- Special highlighting and tracking for certain notable words -- ------------------------------------------------------------------------- { 'folke/todo-comments.nvim', dependencies = 'nvim-lua/plenary.nvim', config = function() require("todo-comments").setup{} end, }, -- Racket support -- ------------------------------------------------------------------------- { 'benknoble/vim-racket', ft = { 'rkt' }, lazy = true, }, -- Janet support -- ------------------------------------------------------------------------- { 'bakpakin/janet.vim', ft = { 'janet' }, lazy = true }, -- PlantUML syntax -- ------------------------------------------------------------------------- { 'aklt/plantuml-syntax', ft = { 'puml' }, lazy = true, }, -- i3 configuration syntax -- ------------------------------------------------------------------------- 'mboughaba/i3config.vim', -- Golang support -- ------------------------------------------------------------------------- { "ray-x/go.nvim", dependencies = { "ray-x/guihua.lua", "neovim/nvim-lspconfig", "nvim-treesitter/nvim-treesitter", }, config = function() require("go").setup() end, ft = { "go", "gomod" }, lazy = true, }, -- Rust support -- ------------------------------------------------------------------------- { 'mrcjkb/rustaceanvim', version = '^4', ft = { 'rust' }, }, })