GnikDroy / projections.nvim

A map to your filesystem
GNU General Public License v3.0
236 stars 8 forks source link

Syntax highlight disabled when reopening the session #9

Closed richban closed 1 year ago

richban commented 1 year ago

When closing nvim and reopening nvim with the saved session the "active" buffer always gets opened without sytanx highlight and LSP.

Here is my config.

Awesome plugin! Want to make this work ;)

https://user-images.githubusercontent.com/6967088/206322218-a5cfd756-1794-4c2f-b6d1-71cb941a9a79.mp4

nyngwang commented 1 year ago

Hi, the syntax highlighting is not enabled because you didn't store enough information in the session data. You can check this by this command on no-highlight files:

:set ft?

to enable highlighting, add this to your config(, assuming your config is written in Lua):

vim.opt.ssop:append({ 'localoptions' })
GnikDroy commented 1 year ago

@richban nyngwang is correct. You want to ensure localoptions is set in session options.

vim.opt.ssop:append({ 'localoptions' })

I will add this in a FAQ somewhere. Feel free to reopen if your problem persists

Edit: FAQ I might as well add this in README since this is a non default setting.

richban commented 1 year ago

Thanks both of you! Awesome plugin!