diff --git a/bin/rtags b/bin/rtags new file mode 100755 index 0000000..131ff93 --- /dev/null +++ b/bin/rtags @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ -n "$1" ] +then mask="^$1:" +else mask='^\/' +fi + +pwd=$(pwd | sed -e 's/\//\\\//g') +cat $HOME/.config/ranger/tagged | sed -e "/$mask/!d" -e "s/$mask//" -e "/^$pwd/!d" diff --git a/vim/plugin/lsp.lua b/vim/plugin/lsp.lua index 30200c4..166506d 100644 --- a/vim/plugin/lsp.lua +++ b/vim/plugin/lsp.lua @@ -1,4 +1,5 @@ local config = require 'lspconfig' +local util = require 'lspconfig.util' local ensure_capabilities xpcall(function() @@ -23,6 +24,15 @@ end}) -- init_options -> during server initialization -- settings -> sent as config change event right after initialization local configs = setmetatable({ + ruby_lsp = default { + init_options = { + formatter = "standard"; + linters = { "standard" }; + } + }, + standardrb = default { + root_dir = util.root_pattern("Gemfile", ".git", ".standard.yml"); + }, yamlls = default { settings = { yaml = { @@ -30,12 +40,6 @@ local configs = setmetatable({ } } }, - ruby_lsp = default { - init_options = { - formatter = "standard"; - linters = { "standard" }; - } - }, }, {__index = function() return default end}) for _, language in ipairs {