added an option to override fzf-lua's NBSP char (closes #347)

main
bhagwan 2 years ago
parent 3ffda9050b
commit f3857a98a7

@ -663,6 +663,9 @@ require'fzf-lua'.setup {
file_icon_colors = {
["lua"] = "blue",
},
-- uncomment if your terminal/font does not support unicode character
-- 'EN SPACE' (U+2002), the below sets it to 'NBSP' (U+00A0) instead
-- nbsp = '\xc2\xa0',
}
```

@ -705,6 +705,9 @@ Consult the list below for available settings:
file_icon_colors = {
["lua"] = "blue",
},
-- uncomment if your terminal/font does not support unicode character
-- 'EN SPACE' (U+2002), the below sets it to 'NBSP' (U+00A0) instead
-- nbsp = '\xc2\xa0',
}
<
This can also be run from a `.vim` file using:

@ -25,6 +25,7 @@ end
M.__resume_data = {}
M.globals = {
nbsp = utils.nbsp,
global_resume = true,
global_resume_query = true,
winopts = {

@ -67,6 +67,8 @@ function M.setup(opts)
end
-- set lua_io if caller requested
utils.set_lua_io(globals.lua_io)
-- set custom &nbsp if caller requested
if globals.nbsp then utils.nbsp = globals.nbsp end
-- reset our globals based on user opts
-- this doesn't happen automatically
config.globals = globals

@ -147,7 +147,9 @@ if not config then
_config.globals.file_icon_padding = load_config_section('globals.file_icon_padding', 'string')
_config.globals.files.git_status_cmd = load_config_section('globals.files.git_status_cmd', 'table')
-- _G.dump(_config)
_config.globals.nbsp = load_config_section('globals.nbsp', 'string')
if _config.globals.nbsp then utils.nbsp = _config.globals.nbsp end
config = _config
end

Loading…
Cancel
Save