nvim: lsp: Drop use of deprecated get_line_diagnostics

This commit is contained in:
Sanchayan Maity 2024-08-02 12:14:14 +05:30
parent 903543b899
commit ef0daa5d4c
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -208,7 +208,7 @@ local on_attach = function(client, bufnr)
buffer = bufnr,
callback = function()
-- Taken from https://github.com/neovim/nvim-lspconfig/wiki/Code-Actions
local context = { diagnostics = vim.lsp.diagnostic.get_line_diagnostics() }
local context = { diagnostics = vim.diagnostic.get(bufnr) }
local params = lsp_util.make_range_params()
params.context = context
vim.lsp.buf_request(0, 'textDocument/codeAction', params, function(err, result, ctx, config)