Skip to content

Commit

Permalink
refactor!: make unsued util functions private
Browse files Browse the repository at this point in the history
If any public function is not used by any configuration, then we can
simply make them private. It is possible that there are external uses of
these functions, but a preliminary search indicated that usage is small
to non-existent.

Functions that are privatized:
- get_active_clients_list_by_ft

Work on neovim#2079.
  • Loading branch information
dundargoc committed Dec 23, 2024
1 parent c580f34 commit 84f8041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lspconfig/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function M.insert_package_json(config_files, field, fname)
return config_files
end

function M.get_active_clients_list_by_ft(filetype)
local function get_active_clients_list_by_ft(filetype)
local clients = M.get_lsp_clients()
local clients_list = {}
for _, client in pairs(clients) do
Expand All @@ -225,7 +225,7 @@ end

function M.get_other_matching_providers(filetype)
local configs = require 'lspconfig.configs'
local active_clients_list = M.get_active_clients_list_by_ft(filetype)
local active_clients_list = get_active_clients_list_by_ft(filetype)
local other_matching_configs = {}
for _, config in pairs(configs) do
if not vim.tbl_contains(active_clients_list, config.name) then
Expand Down

0 comments on commit 84f8041

Please sign in to comment.