Skip to content

Commit

Permalink
Update plugins and improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
wavded committed Sep 12, 2024
1 parent 50fbfe0 commit 049f9f6
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 59 deletions.
8 changes: 4 additions & 4 deletions nvim/lua/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ local servers = {
},
},
},
ts_ls = {
root_dir = util.root_pattern("package.json"),
single_file_support = false,
},
-- ts_ls = {
-- root_dir = util.root_pattern("package.json"),
-- single_file_support = false,
-- },
}

local function on_attach(client, buf)
Expand Down
1 change: 0 additions & 1 deletion nvim/lua/plugins/go.lua

This file was deleted.

14 changes: 0 additions & 14 deletions nvim/lua/plugins/hexokinase.lua

This file was deleted.

147 changes: 110 additions & 37 deletions nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,65 +18,138 @@ function use(name)
end

require("lazy").setup({
"nvim-lua/plenary.nvim",

"tpope/vim-sleuth", -- set tabwidth based on file type
"tpope/vim-eunuch", -- unix commands (:SudoWrite)
{ "lewis6991/gitsigns.nvim", config = use("gitsigns") }, -- git gutter
{ "rebelot/kanagawa.nvim", config = use("theme") }, -- theme
{ "nvim-lualine/lualine.nvim", config = use("lualine") }, -- status line
"nvim-tree/nvim-web-devicons", -- support nerdfont icons

{ "phaazon/hop.nvim", config = use("hop") }, -- motion
{ "echasnovski/mini.nvim", config = use("mini") },
{ "nvim-lualine/lualine.nvim", config = use("lualine") }, -- status line
{ "dcampos/nvim-snippy", config = use("snippy") }, -- snippets

-- git gutter
{
"lewis6991/gitsigns.nvim",
event = "User FilePost",
config = use("gitsigns"),
},

-- lsp
{ "williamboman/mason.nvim", build = ":MasonUpdate", config = use("mason") },
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig", -- makes lsp configuration easier
"b0o/schemastore.nvim", -- simple access to json-language-server schemae
"nvimtools/none-ls.nvim", -- non lsp support
{
"williamboman/mason.nvim",
build = ":MasonUpdate",
config = use("mason"),
dependencies = {
"williamboman/mason-lspconfig.nvim",
},
},
{
"neovim/nvim-lspconfig",
event = "User FilePost",
dependencies = {
"b0o/schemastore.nvim", -- simple access to json-language-server schemae
"nvimtools/none-ls.nvim", -- non lsp support
},
},

-- completion
{ "hrsh7th/nvim-cmp", config = use("cmp") },
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-signature-help",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"dcampos/cmp-snippy",
"lukas-reineke/cmp-rg",

-- helpers
"nvim-lua/plenary.nvim",
"kyazdani42/nvim-web-devicons",
{ "ray-x/guihua.lua", build = "cd lua/fzy && make" },
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
config = use("cmp"),
dependencies = {

-- close pairs and tags
{
{
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup()

-- setup cmp for autopairs
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
require("cmp").event:on(
"confirm_done",
cmp_autopairs.on_confirm_done()
)
end,
},
"windwp/nvim-ts-autotag",
},

-- snippets
{
"dcampos/nvim-snippy",
config = use("snippy"),
},

-- cmp extentions
{
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-signature-help",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"dcampos/cmp-snippy",
"lukas-reineke/cmp-rg",
},
},
},

-- global find / replace
"nvim-pack/nvim-spectre",
{
"nvim-pack/nvim-spectre",
cmd = { "Spectre" },
},

-- file tree
{ "kyazdani42/nvim-tree.lua", config = use("tree") },
{ "antosha417/nvim-lsp-file-operations" },
{
"nvim-tree/nvim-tree.lua",
keys = { "<space>t" },
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
config = use("tree"),
dependencies = {
{ "antosha417/nvim-lsp-file-operations" },
},
},

{ "ibhagwan/fzf-lua", config = use("fzf") }, -- finder

-- highlight color codes
{
"NvChad/nvim-colorizer.lua",
event = "User FilePost",
config = true,
},

-- treesitter
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
build = ":TSUpdate",
config = use("treesitter"),
dependencies = {
-- rainbow delimiters
"HiPhish/rainbow-delimiters.nvim",
-- makes jsx comments work
"JoosepAlviste/nvim-ts-context-commentstring",
},
},
"RRethy/nvim-treesitter-textsubjects", -- adds smart text objects
"windwp/nvim-ts-autotag", -- automatically close jsx tags
"HiPhish/nvim-ts-rainbow2",
"JoosepAlviste/nvim-ts-context-commentstring", -- makes jsx comments actually work
"aklt/plantuml-syntax",

{ "rebelot/kanagawa.nvim", config = use("theme") }, -- theme

-- highlight color codes
-- plantuml syntax - no treesitter support
{
"RRethy/vim-hexokinase",
config = use("hexokinase"),
build = "make hexokinase",
"aklt/plantuml-syntax",
ft = "plantuml",
},

-- lang
{ "ray-x/go.nvim", config = use("go") },
-- { "jose-elias-alvarez/typescript.nvim", config = use("ts") },
{
"ray-x/go.nvim",
ft = "go",
config = true,
},
{
"pmizio/typescript-tools.nvim",
config = true,
},
})
2 changes: 1 addition & 1 deletion nvim/lua/plugins/mini.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require("mini.comment").setup({
})

-- autopairs
require("mini.pairs").setup()
-- require("mini.pairs").setup()

-- indent indicator
require("mini.indentscope").setup({ draw = { delay = 200 } })
Expand Down
3 changes: 2 additions & 1 deletion nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ ts_configs.setup({
enable = true,
keymaps = { ["."] = "textsubjects-smart" },
},
-- rainbow = { enable = true },
})

require("rainbow-delimiters.setup").setup()

require("ts_context_commentstring").setup({
enable_autocmd = false,
})
1 change: 0 additions & 1 deletion nvim/lua/plugins/ts.lua

This file was deleted.

1 change: 1 addition & 0 deletions packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fi;
brew install tree
brew install ripgrep
brew install fd
brew install bat
brew install fzf
brew install wget
brew install autojump
Expand Down

0 comments on commit 049f9f6

Please sign in to comment.