From 051aefdb8cea71294e6e62e8a4a1e051c48e4edd Mon Sep 17 00:00:00 2001 From: Senghan Bright <1448118+sunjon@users.noreply.github.com> Date: Tue, 3 Nov 2020 03:05:10 +0100 Subject: feat: v1 options menu (#133) Still has a bunch of improvements that can be done, but wanted to merge in some of the related changes. * options parser * wip: vimoptions finder * feat: pre-populate ex-command line with `:set foo=` * use options current value when populating command line * fix: use result.raw_value to store original option value * . * options: Continue work on option finder * [WIP]: Tue 27 Oct 2020 10:34:09 PM EDT * [WIP]: Mon 02 Nov 2020 08:20:13 PM EST * [WIP]: Mon 02 Nov 2020 09:04:23 PM EST Co-authored-by: TJ DeVries --- lua/telescope/utils.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lua/telescope/utils.lua') diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 58d8183..1daea57 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -178,4 +178,16 @@ function utils.max_split(s, pattern, maxsplit) return t end + +function utils.data_directory() + local sourced_file = require('plenary.debug_utils').sourced_filepath() + local base_directory = vim.fn.fnamemodify(sourced_file, ":h:h:h") + + return base_directory .. pathlib.separator .. 'data' .. pathlib.separator +end + +function utils.display_termcodes(str) + return str:gsub(string.char(9), ""):gsub("", ""):gsub(" ", "") +end + return utils -- cgit v1.2.3