gorbit99 / codewindow.nvim

MIT License
439 stars 17 forks source link

fix: there is no invalid buffer id error anymore #62

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

Close #61.

  1. I didn't make any early optimization regarding validation. All validation-related modifications were made because I did encounter one error or two for each line during my testing.
  2. No error on auto_enable = true, including switching between sessions in the middle of Lua LSP-indexing nightmare(shown in the demo). This is the full setup I used when I was testing:
expand ```lua require('codewindow').setup { -- layout. relative = 'win', -- 'editor'. minimap_width = 10, z_index = 10, width_multiplier = 4, -- how many characters one dot represents. -- backend. use_treesitter = true, use_lsp = true, use_git = true, exclude_filetypes = { 'oil', 'neo-term', 'noice', 'markdown' }, -- these options are buggy, so do this myself below. active_in_terminals = false, auto_enable = true, } ```
  1. Yes, now it also works with oil.nvim by detecting vim.bo.buftype ~= ''.

a quick demo:

https://github.com/gorbit99/codewindow.nvim/assets/24765272/79effdae-9b9b-44bf-a5ff-02dc2cbed650