Add rtags helper to find ranger tags

This commit is contained in:
Talia 2024-11-19 09:22:14 +01:00
parent 7915594904
commit 2e2189bb2a
2 changed files with 19 additions and 6 deletions

9
bin/rtags Executable file
View file

@ -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"

View file

@ -1,4 +1,5 @@
local config = require 'lspconfig' local config = require 'lspconfig'
local util = require 'lspconfig.util'
local ensure_capabilities local ensure_capabilities
xpcall(function() xpcall(function()
@ -23,6 +24,15 @@ end})
-- init_options -> during server initialization -- init_options -> during server initialization
-- settings -> sent as config change event right after initialization -- settings -> sent as config change event right after initialization
local configs = setmetatable({ 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 { yamlls = default {
settings = { settings = {
yaml = { yaml = {
@ -30,12 +40,6 @@ local configs = setmetatable({
} }
} }
}, },
ruby_lsp = default {
init_options = {
formatter = "standard";
linters = { "standard" };
}
},
}, {__index = function() return default end}) }, {__index = function() return default end})
for _, language in ipairs { for _, language in ipairs {