Skip to content

timtro/glslView-nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glslView-nvim

When editing GLSL shaders, this plugin provides the command GlslView which will open glslViewer to the file being edited in the current buffer. By default, it is opened with the -l flag so that glslViewer will automatically listen for file changes, updating the preview as you save.

📦 Installation

Install the plugin with your preferred package manager. For example, in packer simply:

  use { 'timtro/glslView-nvim', ft = 'glsl' }

Don't forget to PackerCompile after installation so that the plugin will only be loaded for glsl files. You'll also need a plugin to detect the glsl filetype.

Installing glslViewer

See installation in the glslViewer Wiki.

⚙️ Configuration

Configuration is done by passing options to setup(). The defaults are:

require('glslView').setup {
  viewer_path = 'glslViewer',
  args = { '-l' },
}

💪 Usage

Use the command :GlslView to open the current buffer in glslViewer.

Additional arguments will be passed to the executable after any arguments set in configuration.

For example, to start with a 128x256 window:

:GlslView -w 128 -h 256

More primitively, one can call directly through Lua:

:lua require('glslView').glslView({'-w', '128', '-h', '256'})

🧰 Alternatives

  • vim-GlslViewer - Version drift seems to have rendered it useless (at this time) since it laucnes the process with & to free up the UI, but this causes glslViewer to stop rendering (and then in my case, close).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published