diff --git a/lua/plugins/go.lua b/lua/plugins/go.lua new file mode 100644 index 0000000..c38fd22 --- /dev/null +++ b/lua/plugins/go.lua @@ -0,0 +1,15 @@ +return { + "ray-x/go.nvim", + lazy = false, + dependencies = { -- optional packages + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require "configs.go" + end, + event = { "CmdlineEnter" }, + ft = { "go", "gomod", "gowork", "gotmpl" }, + build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c157198..ffde32c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -6,101 +6,6 @@ return { require "configs.conform" end, }, - { - "ray-x/go.nvim", - lazy = false, - dependencies = { -- optional packages - "ray-x/guihua.lua", - "neovim/nvim-lspconfig", - "nvim-treesitter/nvim-treesitter", - }, - config = function() - require "configs.go" - end, - event = { "CmdlineEnter" }, - ft = { "go", "gomod", "gowork", "gotmpl" }, - build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries - }, - -- These are some examples, uncomment them if you want to see them work! - { - "neovim/nvim-lspconfig", - config = function() - require("nvchad.configs.lspconfig").defaults() - require "configs.lspconfig" - end, - }, - { - "williamboman/mason.nvim", - opts = { - ensure_installed = { - "lua-language-server", - "stylua", - "html-lsp", - "css-lsp", - "prettier", - "gopls", - "goimports", - "golines", - "gofumpt", - }, - }, - }, - { - "nvim-tree/nvim-tree.lua", - opts = { - renderer = { - icons = { - glyphs = { - git = { -- this is so stupid lmao - unstaged = "😴", - staged = "😎", - unmerged = "😈", - untracked = "😭", - renamed = "😶", - deleted = "😵", - }, - }, - }, - }, - }, - }, - { - "folke/trouble.nvim", - branch = "dev", -- IMPORTANT! - keys = { - { - "tx", - "Trouble diagnostics toggle", - desc = "Diagnostics (Trouble)", - }, - { - "tX", - "Trouble diagnostics toggle filter.buf=0", - desc = "Buffer Diagnostics (Trouble)", - }, - { - "cs", - "Trouble symbols toggle focus=false", - desc = "Symbols (Trouble)", - }, - { - "cl", - "Trouble lsp toggle focus=false win.position=right", - desc = "LSP Definitions / references / ... (Trouble)", - }, - { - "tL", - "Trouble loclist toggle", - desc = "Location List (Trouble)", - }, - { - "tQ", - "Trouble qflist toggle", - desc = "Quickfix List (Trouble)", - }, - }, - opts = {}, -- for default options, refer to the configuration section for custom setup. - }, -- "nvim-treesitter/nvim-treesitter", -- opts = { -- ensure_installed = { diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua new file mode 100644 index 0000000..7d4f085 --- /dev/null +++ b/lua/plugins/lsp-config.lua @@ -0,0 +1,7 @@ +return { + "neovim/nvim-lspconfig", + config = function() + require("nvchad.configs.lspconfig").defaults() + require "configs.lspconfig" + end, +} diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua new file mode 100644 index 0000000..f4a0a61 --- /dev/null +++ b/lua/plugins/mason.lua @@ -0,0 +1,16 @@ +return { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "lua-language-server", + "stylua", + "html-lsp", + "css-lsp", + "prettier", + "gopls", + "goimports", + "golines", + "gofumpt", + }, + }, +} diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..d900436 --- /dev/null +++ b/lua/plugins/nvim-tree.lua @@ -0,0 +1,19 @@ +return { + "nvim-tree/nvim-tree.lua", + opts = { + renderer = { + icons = { + glyphs = { + git = { -- this is so stupid lmao + unstaged = "😴", + staged = "😎", + unmerged = "😈", + untracked = "😭", + renamed = "😶", + deleted = "😵", + }, + }, + }, + }, + }, +} diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua new file mode 100644 index 0000000..77d2af0 --- /dev/null +++ b/lua/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + "folke/trouble.nvim", + branch = "dev", -- IMPORTANT! + keys = { + { + "tx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "tX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "tL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "tQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, + opts = {}, -- for default options, refer to the configuration section for custom setup. +}