local overrides = require "configs.overrides" local mappings = require "mappings" ---@type NvPluginSpec[] return { --------------------- -- General Plugins -- --------------------- -- LSP Stuff { "williamboman/mason.nvim", -- opts = overrides.mason opts = { ensure_installed = { -- rust stuff "rust-analyzer", -- lua stuff "lua-language-server", "stylua", -- web dev stuff "css-lsp", "html-lsp", "typescript-language-server", -- "deno", "prettier", -- c/cpp slike he has tuff "clangd", "clang-format", -- python stuff "pyright", "mypy", "autoflake", "debugpy", -- "ruff", "shellharden", "gopls", }, }, }, { "ThePrimeagen/refactoring.nvim" }, { "nvimtools/none-ls.nvim", lazy = false, dependencies = "nvimtools/none-ls-extras.nvim", opts = function() return require "configs.null-ls" end, }, { "neovim/nvim-lspconfig", config = function() require "nvchad.configs.lspconfig" require "configs.lspconfig" end, -- Override to setup mason-lspconfig lazy = false, }, -- Debugger { "mfussenegger/nvim-dap", config = function(_, opts) mappings.Dap() end, }, { "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, config = function() local dap = require "dap" local dapui = require "dapui" dapui.setup() dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open() end dap.listeners.before.event_terminated["dapui_config"] = function() dapui.close() end dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end end, }, -- Delimiters { "Raimondi/delimitMate", lazy = false }, -- lazygit { "kdheepak/lazygit.nvim", config = function() mappings.LazyGit() end, lazy = false, }, -- fzf { "junegunn/fzf.vim", lazy = false }, { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim", "junegunn/fzf.vim" }, }, -- Syntax Highlighting { "nvim-treesitter/nvim-treesitter", opts = overrides.treesitter, dependencies = { -- NOTE: additional parser { "nushell/tree-sitter-nu" }, }, }, -- File manager { "nvim-tree/nvim-tree.lua", opts = overrides.nvimtree, }, -- Syntax Highlighting { "nvim-treesitter/nvim-treesitter", -- TODO: opts = overrides.treesitter, }, -- File manager { "nvim-tree/nvim-tree.lua", opts = overrides.nvimtree, }, -- Install a plugin { "max397574/better-escape.nvim", event = "InsertEnter", config = function() require("better_escape").setup() end, }, -- TODO: remove this on nvim 0.10 { "ojroques/nvim-osc52", config = function() local function copy(lines, _) require("osc52").copy(table.concat(lines, "\n")) end local function paste() return { vim.fn.split(vim.fn.getreg "", "\n"), vim.fn.getregtype "" } end vim.g.clipboard = { name = "osc52", copy = { ["+"] = copy, ["*"] = copy }, paste = { ["+"] = paste, ["*"] = paste }, } -- Now the '+' register will copy to system clipboard using OSC52 -- vim.keymap.set('n', 'c', '"+y') -- vim.keymap.set('n', 'cc', '"+yy') end, }, { "zbirenbaum/copilot.lua", event = "InsertEnter", opts = overrides.copilot, lazy = false }, -- Nyoom around files { "smoka7/hop.nvim", lazy = false, config = function() local hop = require "hop" hop.setup() print(mappings.Hop()) end, }, ------------ -- Python -- ------------ { "mfussenegger/nvim-dap-python", ft = "python", dependencies = { "mfussenegger/nvim-dap", "rcarriga/nvim-dap-ui", }, config = function(_, opts) local path = nil local is_windows = vim.fn.has "win64" == 1 or vim.fn.has "win32" == 1 or vim.fn.has "win16" == 1 if is_windows then local cmd = io.popen("where.exe python", "r") path = cmd:read "*line" cmd:close() else local cmd = io.popen("which python", "r") path = cmd:read "*line" cmd:close() end require("dap-python").setup(path) mappings.Dap_python() end, }, ---------- -- Rust -- ---------- { "rust-lang/rust.vim", ft = "rust", init = function() vim.g.rustfmt_autosave = 1 end, }, { "simrat39/rust-tools.nvim", ft = "rust", dependencies = "neovim/nvim-lspconfig", opts = function() return require "configs.rust-tools" end, config = function(_, opts) require("rust-tools").setup(opts) end, }, { "saecki/crates.nvim", ft = { "rust", "toml" }, config = function(_, opts) local crates = require "crates" crates.setup(opts) crates.show() end, }, ----------- -- swkhd -- ----------- { "waycrate/swhkd-vim", ft = { "swhkdrc", "swhkd" } }, -------------- -- Obsidian -- -------------- -- { -- "epwalsh/obsidian.nvim", -- ft = "markdown", -- lazy = false, -- dependencies = { -- "nvim-lua/plenary.nvim", -- "nvim-telescope/telescope.nvim", -- "nvim-treesitter/nvim-treesitter", -- }, -- opts = { -- -- workspaces = {} -- config = function(_, opts) -- end, -- }, -- }, -------------- -- Markdown -- -------------- { "nfrid/markdown-togglecheck", dependencies = { "nfrid/treesitter-utils" }, ft = { "markdown" }, config = function(_, opts) -- require("markdown-togglecheck").setup() mappings.Markdown() end, }, ------------ -- Golang -- ------------ { "leoluz/nvim-dap-go", dependencies = { "mfussenegger/nvim-dap", "rcarriga/nvim-dap-ui", }, ft = "go", config = function(_, opts) require("dap-go").setup() mappings.Dap_go() end, }, -- All NvChad plugins are lazy-loaded by default -- For a plugin to be loaded, you will need to set either `ft`, `cmd`, `keys`, `event`, or set `lazy = false` -- If you want a plugin to load on startup, add `lazy = false` to a plugin spec, for example -- { -- "mg979/vim-visual-multi", -- lazy = false, -- } }