diff options
| author | Senghan Bright <1448118+sunjon@users.noreply.github.com> | 2020-11-03 03:05:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-02 21:05:10 -0500 |
| commit | 051aefdb8cea71294e6e62e8a4a1e051c48e4edd (patch) | |
| tree | b46ca931f284f6fad19d3e3f80061cf1070736c9 /lua/telescope/utils.lua | |
| parent | 855d818a5dc3e7762a6c375b424cc99e1a7e8553 (diff) | |
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 <devries.timothyj@gmail.com>
Diffstat (limited to 'lua/telescope/utils.lua')
| -rw-r--r-- | lua/telescope/utils.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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), "<TAB>"):gsub("", "<C-F>"):gsub(" ", "<Space>") +end + return utils |
