This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- attached as https://github.com/przepompownia/mini-ui-messages-example/blob/main/minimal.lua - this version can be outdated | |
| local api = vim.api | |
| local ns = api.nvim_create_namespace('messageRedirection') | |
| local hls = setmetatable({}, { | |
| __index = function (t, id) | |
| return rawget(t, id) or (rawset(t, id, vim.fn.synIDattr(id, 'name')) and rawget(t, id)) | |
| end | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local thisInitFile = debug.getinfo(1).source:match('@?(.*)') | |
| local cwd = vim.fs.dirname(thisInitFile) | |
| local appname = vim.env.NVIM_APPNAME or 'nvim' | |
| vim.env.XDG_CONFIG_HOME = cwd | |
| vim.env.XDG_DATA_HOME = vim.fs.joinpath(cwd, '.xdg', 'data') | |
| vim.env.XDG_STATE_HOME = vim.fs.joinpath(cwd, '.xdg', 'state') | |
| vim.env.XDG_CACHE_HOME = vim.fs.joinpath(cwd, '.xdg', 'cache') | |
| vim.fn.mkdir(vim.fs.joinpath(vim.env.XDG_CACHE_HOME, appname), 'p') | |
| local stdPathConfig = vim.fn.stdpath('config') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # see https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/lua.template.editorconfig | |
| [*.lua] | |
| indent_style = space | |
| indent_size = 2 | |
| tab_width = 2 | |
| quote_style = single | |
| call_arg_parentheses = keep | |
| continuation_indent = 2 | |
| align_call_args = false | |
| align_function_params = true |