Skip to content

semanticart/ruby-code-actions.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ruby-code-actions.nvim

Ruby code actions for null-ls in neovim.

Usage

Require in your favorite package manager and then specify as a source. e.g. in packer

use {
    'jose-elias-alvarez/null-ls.nvim',
    requires = {
        {'nvim-lua/plenary.nvim'},
        {"semanticart/ruby-code-actions.nvim"}
    },
    config = function()
        local null_ls = require("null-ls")
        local ruby_code_actions = require("ruby-code-actions")
        local sources = {
            -- require any built-ins you want
            null_ls.builtins.formatting.rubocop,
            null_ls.builtins.diagnostics.rubocop,
            -- ...
            -- now require any ruby-code-actions you want
            ruby_code_actions.insert_frozen_string_literal,
            ruby_code_actions.autocorrect_with_rubocop
        }
        null_ls.setup({sources = sources})
    end
}

You can invoke these code actions the same way you'd invoke any other code action in your setup. e.g. with telescope you can do :Telescope lsp_code_actions

Currently implemented

Overriding action titles

You can override action titles by providing your own strings. See the spec works if the action title is overridden for an example.

Contributing

This is mostly an experiment on my part but I'll consider contributions. If you want to do some development, be aware that you can run existing plenary specs with make.

Further reading

About

ruby code actions for null-ls in neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors