Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed deprecation #19

Open
wants to merge 2 commits into
base: table_version
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lua/sttusline/components/lsps-formatters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ return {
event = { "LspAttach", "LspDetach", "BufWritePost", "BufEnter", "VimResized" }, -- The component will be update when the event is triggered
colors = { fg = colors.magenta }, -- { fg = colors.black, bg = colors.white }
update = function()
local buf_clients = vim.lsp.buf_get_clients()
local bufnr = vim.api.nvim_get_current_buf()
local buf_clients = vim.lsp.get_clients { bufnr = bufnr }
local server_names = {}
local has_null_ls = false
local ignore_lsp_servers = {
Expand All @@ -23,7 +24,7 @@ return {
has_null_ls, null_ls = pcall(require, "null-ls")

if has_null_ls then
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
local buf_ft = vim.api.nvim_get_option_value("filetype", { buf = bufnr })
local null_ls_methods = {
null_ls.methods.DIAGNOSTICS,
null_ls.methods.DIAGNOSTICS_ON_OPEN,
Expand Down