mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(nvim): Lsp filename with nvim-lsp-file-operations
This commit is contained in:
@@ -196,6 +196,17 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"antosha417/nvim-lsp-file-operations",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("lsp-file-operations").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ return {
|
|||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local servers = {}
|
local servers = {}
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
|
|
||||||
-- TIP: `nvim-lspconfig` has default LSP configs in its DB which saves time
|
-- TIP: `nvim-lspconfig` has default LSP configs in its DB which saves time
|
||||||
-- Useful even after NeoVim 0.11, which made LSP setup much easier
|
-- Useful even after NeoVim 0.11, which made LSP setup much easier
|
||||||
@@ -22,7 +21,12 @@ return {
|
|||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
local server = servers[server_name] or {}
|
local server = servers[server_name] or {}
|
||||||
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
|
require("lsp-file-operations").default_capabilities(),
|
||||||
|
server.capabilities or {}
|
||||||
|
)
|
||||||
server.inlay_hints = { enabled = true }
|
server.inlay_hints = { enabled = true }
|
||||||
server.diagnostics = {
|
server.diagnostics = {
|
||||||
underline = true,
|
underline = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user