summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins.lua')
-rwxr-xr-x.config/nvim/lua/plugins.lua208
1 files changed, 208 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
new file mode 100755
index 0000000..630c934
--- /dev/null
+++ b/.config/nvim/lua/plugins.lua
@@ -0,0 +1,208 @@
+-- Plugin declarations
+-- All plugins used in Neovim are defined here
+
+
+-- Bootstrap lazy.nvim
+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",
+ lazypath,
+ })
+end
+vim.opt.rtp:prepend(lazypath)
+
+-- Initialize lazy.nvim with plugins
+require("lazy").setup({
+ ------------------------------------------------------------
+ -- UI
+ ------------------------------------------------------------
+
+ -- Colorscheme
+ {
+ "folke/tokyonight.nvim",
+ lazy = false,
+ priority = 1000,
+ config = function()
+ vim.cmd.colorscheme("tokyonight-night")
+ end,
+ },
+
+ -- File browser
+ {
+ 'stevearc/oil.nvim',
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ cmd = "Oil",
+ },
+
+ -- Terminal
+ {
+ 'akinsho/toggleterm.nvim',
+ version = "*",
+ cmd = {"ToggleTerm", "ToggleTermSendCurrentLine", "ToggleTermSendVisualLines"},
+ },
+
+ ------------------------------------------------------------
+ -- EDITOR ENHANCEMENTS
+ ------------------------------------------------------------
+
+ -- Telescope (fuzzy finder)
+ {
+ 'nvim-telescope/telescope.nvim',
+ dependencies = { 'nvim-lua/plenary.nvim' },
+ cmd = "Telescope",
+ },
+
+ -- Harpoon (quick file navigation)
+ {
+ "ThePrimeagen/harpoon",
+ branch = "harpoon2",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ },
+
+ -- Git integration
+ {
+ 'tpope/vim-fugitive',
+ cmd = {"Git", "Gstatus", "Gblame", "Gdiffsplit", "Gread", "Gwrite", "Ggrep", "GMove", "GDelete"},
+ },
+
+ -- Undo history visualization
+ {
+ 'mbbill/undotree',
+ cmd = "UndotreeToggle",
+ },
+
+ ------------------------------------------------------------
+ -- CODE EDITING
+ ------------------------------------------------------------
+
+ -- Syntax highlighting
+ {
+ 'nvim-treesitter/nvim-treesitter',
+ build = ':TSUpdate',
+ event = { "BufReadPost", "BufNewFile" },
+ cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
+ dependencies = {
+ 'nvim-treesitter/nvim-treesitter-context',
+ },
+ },
+
+ -- Comments
+ {
+ 'numToStr/Comment.nvim',
+ event = { "BufReadPost", "BufNewFile" },
+ },
+
+ -- Auto brackets
+ {
+ 'windwp/nvim-autopairs',
+ event = "InsertEnter",
+ config = true,
+ },
+
+ -- LaTeX support
+ {
+ "lervag/vimtex",
+ ft = {"tex", "latex"},
+ init = function()
+ vim.g.vimtex_view_method = "zathura"
+ end
+ },
+
+ ------------------------------------------------------------
+ -- LSP & COMPLETION
+ ------------------------------------------------------------
+ -- LSP Base
+ {
+ "mason-org/mason.nvim",
+ "mason-org/mason-lspconfig.nvim",
+ "neovim/nvim-lspconfig",
+},
+ {
+ "folke/lazydev.nvim",
+ ft = "lua", -- only load on lua files
+ opts = {
+ library = {
+ -- See the configuration section for more details
+ -- Load luvit types when the `vim.uv` word is found
+ { path = "${3rd}/luv/library", words = { "vim%.uv" } },
+ },
+ },
+ },
+
+ -- Autocompletion
+ {
+ 'saghen/blink.cmp',
+ -- optional: provides snippets for the snippet source
+ dependencies = { 'rafamadriz/friendly-snippets' },
+
+ version = '1.*',
+ opts = {
+ -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
+ -- 'super-tab' for mappings similar to vscode (tab to accept)
+ -- 'enter' for enter to accept
+ -- 'none' for no mappings
+ --
+ -- All presets have the following mappings:
+ -- C-space: Open menu or open docs if already open
+ -- C-n/C-p or Up/Down: Select next/previous item
+ -- C-e: Hide menu
+ -- C-k: Toggle signature help (if signature.enabled = true)
+ --
+ -- See :h blink-cmp-config-keymap for defining your own keymap
+ keymap = { preset = 'default' },
+
+ appearance = {
+ -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
+ -- Adjusts spacing to ensure icons are aligned
+ nerd_font_variant = 'mono'
+ },
+
+ -- (Default) Only show the documentation popup when manually triggered
+ completion = { documentation = { auto_show = true} },
+
+ -- Default list of enabled providers defined so that you can extend it
+ -- elsewhere in your config, without redefining it, due to `opts_extend`
+sources = {
+ -- add lazydev to your completion providers
+ default = { "lazydev", "lsp", "path", "snippets", "buffer" },
+ providers = {
+ lazydev = {
+ name = "LazyDev",
+ module = "lazydev.integrations.blink",
+ -- make lazydev completions top priority (see `:h blink.cmp`)
+ score_offset = 100,
+ },
+ },
+ },
+ -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
+ -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
+ -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
+ --
+ -- See the fuzzy documentation for more information
+ fuzzy = { implementation = "prefer_rust_with_warning" }
+ },
+ opts_extend = { "sources.default" }
+},
+
+}, {
+ -- Lazy.nvim options
+ install = { colorscheme = { "tokyonight-night" } },
+ checker = { enabled = true, frequency = 86400 }, -- Check for updates once per day
+ change_detection = { notify = false },
+ performance = {
+ rtp = {
+ disabled_plugins = {
+ "gzip",
+ "tarPlugin",
+ "tohtml",
+ "tutor",
+ "zipPlugin",
+ },
+ },
+ },
+})
Back to https://optics-design.com