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

Deprecated function in example evil_lualine.lua #1246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bryanme5
Copy link

@bryanme5 bryanme5 commented May 23, 2024

When using the example of evil_line.lua, show the following error:

remove

In neovim 0.12 vim.lsp.get_active_clients() function will be deprecated, vim.lsp.get_clients() solve the problem and works perfectly

iton0

This comment was marked as duplicate.

@@ -160,7 +160,7 @@ ins_left {
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
Copy link

@iton0 iton0 May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim.api.nvim_buf_get_option is also deprecated with nvim 0.10.
I believe that local buf_ft = vim.api.nvim_get_option_value('filetype', {}) should be used instead

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better readability and be more specific defining the buffer, we can use local buf_ft = vim.api.nvim_get_option_value('filetype', { 'buf': 0 }), no?
The scope option it's not necessary because by default the use of buf implies {scope} is local.
Here is the documentation

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the only adjustment is instead of 'buf' : 0 it should be buf = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants