nvim-neo-tree / neo-tree.nvim

Neovim plugin to manage the file system and other tree like structures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: vim.diagnostics.is_disabled() is deprecated

ulisses-cruz opened this issue · comments

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

v0.11.0-dev-25+g0e187fe03

Operating System / Version

Mac 14.4.1

Describe the Bug

when opening the first buffer with vim I get a warning saying that the vim.diagnostic.is_disabled() is deprecated as shown in the image bellow

Screenshots, Traceback

image

Steps to Reproduce

open a buffer with vim

Expected Behavior

not to show the warning

Your Configuration

return {
    'nvim-neo-tree/neo-tree.nvim',
    branch = 'v3.x',
    config = function()
        vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]

        vim.fn.sign_define('DiagnosticSignError', { text = '', texthl = 'DiagnosticSignError' })
        vim.fn.sign_define('DiagnosticSignWarn', { text = '', texthl = 'DiagnosticSignWarn' })
        vim.fn.sign_define('DiagnosticSignInfo', { text = '', texthl = 'DiagnosticSignInfo' })
        vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint' })

        local opts = { noremap = true, silent = true }
        vim.keymap.set('n', '<leader>e', ':Neotree focus toggle filesystem<cr>', opts)
        vim.keymap.set('n', '<leader>a', ':Neotree focus toggle buffers<cr>', opts)

        require('neo-tree').setup {
            close_if_last_window = true,
            filesystem = {
                follow_current_file = {
                    enabled = true,
                    leave_dirs_open = false,
                },
                group_empty_dirs = false,
                hijack_netrw_behavior = 'open_default',
                use_libuv_file_watcher = true,
            },
            window = {
                mappings = {
                    ['<bs>'] = 'close_node',
                    [';'] = 'navigate_up',
                },
            },
        }
    end,
}

Dup