From ba05846b9f8b1125f606d412e349a11e3287f913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D0=BB=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC?= Date: Wed, 3 Jun 2026 21:58:43 +0300 Subject: [PATCH] feat(ui): Add more LSP improvements, install fancy UI plugins --- after/lsp/intelephense.lua | 3 ++- after/lsp/vtsls.lua | 37 +++++++++++++++++++++++-------------- after/lsp/vue_ls.lua | 4 +++- after/plugin/fidget.lua | 5 +++++ after/plugin/gitsigns.lua | 1 + after/plugin/laravel.lua | 3 +++ after/plugin/lspsaga.lua | 10 ++++++++++ after/plugin/scrollbar.lua | 3 +++ after/plugin/tree.lua | 3 +++ init.lua | 3 ++- lua/completion.lua | 12 +++++++++++- lua/plugins.lua | 6 ++++++ nvim-pack-lock.json | 16 ++++++++++++++++ 13 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 after/plugin/fidget.lua create mode 100644 after/plugin/laravel.lua create mode 100644 after/plugin/lspsaga.lua create mode 100644 after/plugin/scrollbar.lua diff --git a/after/lsp/intelephense.lua b/after/lsp/intelephense.lua index 1ba948c..028dde3 100644 --- a/after/lsp/intelephense.lua +++ b/after/lsp/intelephense.lua @@ -1,6 +1,7 @@ ---@type vim.lsp.Config return { - root_markers = { "composer.json" }, + filetypes = { "php" }, + root_markers = { ".git" }, ---@type lspconfig.settings.intelephense settings = { intelephense = { diff --git a/after/lsp/vtsls.lua b/after/lsp/vtsls.lua index fc91696..b9933ba 100644 --- a/after/lsp/vtsls.lua +++ b/after/lsp/vtsls.lua @@ -5,7 +5,30 @@ return { "typescript", "vue", }, + ---@type lspconfig.settings.vtsls settings = { + typescript = { + inlayHints = { + enumMemberValues = { + enabled = true, + }, + parameterNames = { + enabled = "literals", + }, + parameterTypes = { + enabled = true, + }, + propertyDeclarationTypes = { + enabled = true, + }, + variableTypes = { + enabled = true, + }, + functionLikeReturnTypes = { + enabled = true, + }, + }, + }, ---@type lspconfig.settings.vtsls vtsls = { tsserver = { @@ -22,20 +45,6 @@ return { autoImports = true, }, updateImportsOnFileMove = { enabled = "always" }, - inlayHints = { - enumMemberValues = { - enabled = true, - }, - parameterNames = { - enabled = "literals", - }, - parameterTypes = { - enabled = true, - }, - propertyDeclarationTypes = { - enabled = true, - }, - }, }, }, } diff --git a/after/lsp/vue_ls.lua b/after/lsp/vue_ls.lua index f97e425..12ea4ee 100644 --- a/after/lsp/vue_ls.lua +++ b/after/lsp/vue_ls.lua @@ -1,2 +1,4 @@ ---@type lspconfig.Config -return {} +return { + enabled = false, +} diff --git a/after/plugin/fidget.lua b/after/plugin/fidget.lua new file mode 100644 index 0000000..a2a7391 --- /dev/null +++ b/after/plugin/fidget.lua @@ -0,0 +1,5 @@ +local fidget = require("fidget") + +local options = {} + +fidget.setup(options) diff --git a/after/plugin/gitsigns.lua b/after/plugin/gitsigns.lua index bed13bc..3ca753e 100644 --- a/after/plugin/gitsigns.lua +++ b/after/plugin/gitsigns.lua @@ -6,3 +6,4 @@ gitsigns.setup({ delay = 100, }, }) +require("scrollbar.handlers.gitsigns").setup() diff --git a/after/plugin/laravel.lua b/after/plugin/laravel.lua new file mode 100644 index 0000000..313c67d --- /dev/null +++ b/after/plugin/laravel.lua @@ -0,0 +1,3 @@ +local laravel = require("laravel") + +laravel.setup() diff --git a/after/plugin/lspsaga.lua b/after/plugin/lspsaga.lua new file mode 100644 index 0000000..0ba63d5 --- /dev/null +++ b/after/plugin/lspsaga.lua @@ -0,0 +1,10 @@ +local lspsaga = require("lspsaga") + +lspsaga.setup({ + implement = { + enable = true, + }, + symbol_in_winbar = { + enable = true, + }, +}) diff --git a/after/plugin/scrollbar.lua b/after/plugin/scrollbar.lua new file mode 100644 index 0000000..1c645ad --- /dev/null +++ b/after/plugin/scrollbar.lua @@ -0,0 +1,3 @@ +local scrollbar = require("scrollbar") + +scrollbar.setup() diff --git a/after/plugin/tree.lua b/after/plugin/tree.lua index 39d3bc6..ebe445b 100644 --- a/after/plugin/tree.lua +++ b/after/plugin/tree.lua @@ -8,6 +8,9 @@ end ---@type nvim_tree.config local options = { + view = { + side = "right", + }, update_focused_file = { enable = true, exclude = function(args) diff --git a/init.lua b/init.lua index 4d284cc..0e68f75 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,7 @@ opt.tabstop = 4 opt.shiftwidth = 4 opt.softtabstop = 4 opt.smartindent = true -opt.breakindent = true +opt.autoindent = true -- Search opt.ignorecase = true @@ -62,3 +62,4 @@ opt.mouse = "a" opt.showmode = false opt.isfname:append("@-@") opt.exrc = true +opt.winbar = "%=%m" diff --git a/lua/completion.lua b/lua/completion.lua index 154b24b..43b1256 100644 --- a/lua/completion.lua +++ b/lua/completion.lua @@ -6,7 +6,17 @@ cmp.build():pwait() ---@type blink.cmp.Config local cmp_options = { keymap = { preset = "default" }, - completion = { menu = { auto_show = true }, documentation = { auto_show = true } }, + completion = { + menu = { auto_show = true }, + documentation = { auto_show = true }, + ghost_text = { enabled = true }, + list = { + selection = { + auto_insert = false, + preselect = true, + }, + }, + }, sources = { default = { "lsp", "path", "snippets", "buffer" } }, fuzzy = { implementation = "rust" }, } diff --git a/lua/plugins.lua b/lua/plugins.lua index 40cfc46..a55d308 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -39,6 +39,12 @@ vim.pack.add({ { src = "https://github.com/nvim-tree/nvim-tree.lua" }, { src = "https://github.com/tpope/vim-fugitive" }, { src = "https://github.com/lewis6991/gitsigns.nvim" }, + { src = "https://github.com/petertriho/nvim-scrollbar" }, + { src = "https://github.com/j-hui/fidget.nvim" }, + { src = "https://github.com/nvimdev/lspsaga.nvim" }, + + -- Framework specific + { src = "https://github.com/adibhanna/laravel.nvim" }, -- WoW Addon API { src = "https://github.com/Tyrannican/warcraft-api.nvim" }, diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index fa92c2d..facbbc2 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -12,10 +12,22 @@ "rev": "619363c30309d29ffa631e67c8183f2a72caa373", "src": "https://github.com/stevearc/conform.nvim" }, + "fidget.nvim": { + "rev": "82404b196e73a00b1727a91903beef5ddc319d22", + "src": "https://github.com/j-hui/fidget.nvim" + }, "gitsigns.nvim": { "rev": "dd3f588bacbeb041be6facf1742e42097f62165d", "src": "https://github.com/lewis6991/gitsigns.nvim" }, + "laravel.nvim": { + "rev": "a0013e3ee80f09baed482cc79b03b0fc00ea47b0", + "src": "https://github.com/adibhanna/laravel.nvim" + }, + "lspsaga.nvim": { + "rev": "3e33a6a6c5d379f3d4fae77fae6b53b762a0a30f", + "src": "https://github.com/nvimdev/lspsaga.nvim" + }, "lualine.nvim": { "rev": "221ce6b2d999187044529f49da6554a92f740a96", "src": "https://github.com/nvim-lualine/lualine.nvim" @@ -40,6 +52,10 @@ "rev": "9573948c38bfabeec353ae7dd7d3ffec4c506a6b", "src": "https://github.com/neovim/nvim-lspconfig" }, + "nvim-scrollbar": { + "rev": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8", + "src": "https://github.com/petertriho/nvim-scrollbar" + }, "nvim-tree.lua": { "rev": "07f541fcaa4a5ae019598240362449ab7e9812b3", "src": "https://github.com/nvim-tree/nvim-tree.lua"