remove list_includes_item util function
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
local lsp_installer = require("nvim-lsp-installer")
|
local lsp_installer = require("nvim-lsp-installer")
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
local list_includes_item = require("user.utils").list_includes_item
|
|
||||||
local util = require("lspconfig").util
|
local util = require("lspconfig").util
|
||||||
|
|
||||||
local kind_icons = {
|
local kind_icons = {
|
||||||
@@ -141,7 +140,7 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true
|
|||||||
local lsps_with_disabled_formatting = { "tsserver", "gopls", "jsonls", "html" }
|
local lsps_with_disabled_formatting = { "tsserver", "gopls", "jsonls", "html" }
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
if list_includes_item(lsps_with_disabled_formatting, client.name) then
|
if vim.tbl_contains(lsps_with_disabled_formatting, client.name) then
|
||||||
client.resolved_capabilities.document_formatting = false
|
client.resolved_capabilities.document_formatting = false
|
||||||
client.resolved_capabilities.document_range_formatting = false
|
client.resolved_capabilities.document_range_formatting = false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.list_includes_item = function(list, item)
|
|
||||||
for _, value in pairs(list) do
|
|
||||||
if value == item then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
M.yank = function(message)
|
M.yank = function(message)
|
||||||
if vim.fn.has("win32") == 1 then
|
if vim.fn.has("win32") == 1 then
|
||||||
os.execute("echo '" .. message .. "' | win32yank -i")
|
os.execute("echo '" .. message .. "' | win32yank -i")
|
||||||
|
|||||||
Reference in New Issue
Block a user