You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Details
Discussion: #285
`lspsaga` creates a buffer than iterates through a list of buffer
options to update the buffer. This makes sense however depending on the
iteration order of the options different things can happen.
- `filetype = markdown` then `buftype = nofile`: this will trigger the
`FileType` autocommand and at the time it runs the `buftype` will be
the empty string, which means overrides for `nofile` will not work.
- `buftype = nofile` then `filetype = markdown`: will also trigger the
`FileType` autocommand but now at the time it runs the `buftype` will
be correctly set to `nofile` and overrides will work.
To avoid this inconsistent behavior we need some property of the buffer
that will always hold. The solution to this is to use the `buflisted`
property, which gets set at the moment the buffer is created when
`nvim_create_buf` is called. Users can than disable this plugin in
`lspsaga` buffers by setting:
```lua
require('render-markdown').setup({
overrides = {
buflisted = { [false] = { enabled = false } },
},
})
```
0 commit comments