repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: refactor user commands into facade

eb49c89d89f42f0cbd9949309a4f78b40e2489d1

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (16)

neovim/ftplugin/lua.lua

Modified
19 19 buffer = true,
20 20 remap = true,
23 +--TODO: add debug.print, require, prequire
24 +prequire 'nvim-surround'.buffer_setup {
25 + surrounds = {
26 + ['P'] = {
27 + add = { 'vim.print(', ')', },
28 + find = 'vim%.print%b()',
29 + delete = '^(vim%.print%()().-(%))()$',
30 + change = {
31 + target = '^(vim%.print%()().-(%))()$',
32 + },
33 + },
34 + },

neovim/lazy-lock.json

Modified
28 28 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
29 29 "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" },
30 30 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
31 + "neodev.nvim": { "branch": "main", "commit": "6a533ed9d3435dcaa456380d833ea04da37ea2ed" },
31 32 "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
32 33 "neorg": { "branch": "main", "commit": "d2d2167a5562d133723ba9ac0cf7f3e991df8a30" },
33 34 "neotest": { "branch": "master", "commit": "e07fe8241112274aae9947b98d255763738a1d52" },

neovim/lua/bugabinga/lsp/clients/lua.lua

Modified
7 7 root_dir = project.find_lua_project_root,
8 8 single_file_support = true,
9 9 workspaces = true,
10 + before_init = prequire 'neodev.lsp'.before_init,
10 11 settings = {
11 12 Lua = {
12 13 addonManager = { enable = false, },

neovim/lua/bugabinga/lsp/init.lua

Modified
1 1 local debug = require 'std.debug'
2 +local icon = require 'std.icon'
2 3 local defer = require 'std.defer'
3 4 local map = require 'std.map'
4 5 local auto = require 'std.auto'
5 6 local ui = require 'bugabinga.ui'
6 7 local table = require 'std.table'
7 8 local ignored = require 'std.ignored'
8 -local user_command = vim.api.nvim_create_user_command
9 +local user_command = require 'std.user_command'
9 10 local lsp_client_configs = require 'bugabinga.lsp.clients'
10 11 local localrc = require 'std.localrc'
14 15 require 'bugabinga.lsp.lightbulb'
16 17 local token_update = function ( lsp_client )
17 - local token = lsp_client.data.token
18 - local buffer = lsp_client.buffer
19 - local client_id = lsp_client.data.client_id
20 - local mutable_variable_highlight = 'MutableVariable'
18 + local token = lsp_client.data.token
19 + local buffer = lsp_client.buffer
20 + local client_id = lsp_client.data.client_id
21 + local mutable_variable_highlight = 'MutableVariable'
22 - if token.type == 'variable' and not token.modifiers.readonly then
23 - vim.lsp.semantic_tokens.highlight_token( token, buffer, client_id, mutable_variable_highlight )
24 - end
23 + if token.type == 'variable' and not token.modifiers.readonly then
24 + vim.lsp.semantic_tokens.highlight_token( token, buffer, client_id, mutable_variable_highlight )
25 + end
26 - --TODO: find more use cases for semantic tokens
27 - --* global variables
28 - --* functions with side effects
29 - --* closures that capture something
27 + --TODO: find more use cases for semantic tokens
28 + --* global variables
29 + --* functions with side effects
30 + --* closures that capture something
32 33 local expand_path = function ( path )
33 - if vim.fn.executable( path ) == 1 then
34 - return vim.fn.exepath( path )
35 - else
36 - return path
37 - end
34 + if vim.fn.executable( path ) == 1 then
35 + return vim.fn.exepath( path )
36 + else
37 + return path
38 + end
40 41 local expand_command = function ( command )
41 - vim.validate { command = { command, { 'string', 'table', }, }, }
42 + vim.validate { command = { command, { 'string', 'table', }, }, }
43 - if type( command ) == 'table' then
44 - command[1] = expand_path( command[1] )
45 - return command
46 - end
44 + if type( command ) == 'table' then
45 + command[1] = expand_path( command[1] )
46 + return command
47 + end
48 - return expand_path( command )
49 + return expand_path( command )
51 52 local lsp_start = function ( file_type_event )
52 - debug.print 'trying to start lsp'
53 - local match = file_type_event.match
53 + debug.print 'trying to start lsp'
54 + local match = file_type_event.match
55 - debug.print( 'filetypes to ignore', ignored.filetypes, 'current filetype', match )
56 - if vim.iter( ignored.filetypes ):find( match ) then return end
56 + debug.print( 'filetypes to ignore', ignored.filetypes, 'current filetype', match )
57 + if vim.iter( ignored.filetypes ):find( match ) then return end
58 - local bufnr = file_type_event.buf
59 - local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr, } )
60 - debug.print( 'buftypes to ignore', ignored.buftypes, 'current buftype', buftype )
61 - if vim.iter( ignored.buftypes ):find( buftype ) then return end
59 + local bufnr = file_type_event.buf
60 + local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr, } )
61 + debug.print( 'buftypes to ignore', ignored.buftypes, 'current buftype', buftype )
62 + if vim.iter( ignored.buftypes ):find( buftype ) then return end
63 - local buffer_path = vim.api.nvim_buf_get_name( bufnr )
64 + local buffer_path = vim.api.nvim_buf_get_name( bufnr )
65 - debug.print( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) )
66 + debug.print( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) )
67 - local potential_client_configs = vim.iter( lsp_client_configs )
68 - :map( function ( config )
69 - vim.validate {
70 - ['config'] = { config, 'table', },
71 - ['config.name'] = { config.name, 'string', },
72 - ['config.filetypes'] = { config.filetypes, { 'string', 'table', }, },
73 - ['config.command'] = { config.command, { 'string', 'table', }, },
74 - ['config.environment'] = { config.environment, 'table', true, },
75 - ['config.root_dir'] = { config.root_dir, 'function', 'string', },
76 - ['config.single_file_support'] = { config.single_file_support, 'boolean', true, },
77 - ['config.settings'] = { config.settings, 'table', true, },
78 - ['config.workspaces'] = { config.workspaces, 'boolean', true, },
79 - ['config.before_init'] = { config.before_init, 'function', true, },
80 - ['config.init_options'] = { config.init_options, 'table', true, },
81 - ['config.capabilities'] = { config.capabilities, 'table', true, },
82 - ['config.custom_start'] = { config.custom_start, 'function', true, },
83 - }
84 - -- normalize scalar values to its vector alternative for easier processing later on
85 - -- this mutates the lsp client configs! careful!
86 - config.command = type( config.command ) == 'string' and { expand_command( config.command ), } or
87 - expand_command( config.command )
88 - config.environment = config.environment or {}
89 - config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes, } or config.filetypes
90 - config.single_file_support = config.single_file_support == nil and false or config.single_file_support
91 - config.workspaces = config.workspaces == nil and false or config.workspaces
92 - config.capabilities = config.capabilities or {}
93 - config.init_options = config.init_options or {}
68 + local potential_client_configs = vim.iter( lsp_client_configs )
69 + :map( function ( config )
70 + vim.validate {
71 + ['config'] = { config, 'table', },
72 + ['config.name'] = { config.name, 'string', },
73 + ['config.filetypes'] = { config.filetypes, { 'string', 'table', }, },
74 + ['config.command'] = { config.command, { 'string', 'table', }, },
75 + ['config.environment'] = { config.environment, 'table', true, },
76 + ['config.root_dir'] = { config.root_dir, 'function', 'string', },
77 + ['config.single_file_support'] = { config.single_file_support, 'boolean', true, },
78 + ['config.settings'] = { config.settings, 'table', true, },
79 + ['config.workspaces'] = { config.workspaces, 'boolean', true, },
80 + ['config.before_init'] = { config.before_init, 'function', true, },
81 + ['config.init_options'] = { config.init_options, 'table', true, },
82 + ['config.capabilities'] = { config.capabilities, 'table', true, },
83 + ['config.custom_start'] = { config.custom_start, 'function', true, },
84 + }
85 + -- normalize scalar values to its vector alternative for easier processing later on
86 + -- this mutates the lsp client configs! careful!
87 + config.command = type( config.command ) == 'string' and { expand_command( config.command ), } or
88 + expand_command( config.command )
89 + config.environment = config.environment or {}
90 + config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes, } or config.filetypes
91 + config.single_file_support = config.single_file_support == nil and false or config.single_file_support
92 + config.workspaces = config.workspaces == nil and false or config.workspaces
93 + config.capabilities = config.capabilities or {}
94 + config.init_options = config.init_options or {}
95 - return config
96 - end )
97 - :filter( function ( config )
98 - return vim.iter( config.filetypes ):find( match )
99 - end )
100 - :totable()
96 + return config
97 + end )
98 + :filter( function ( config )
99 + return vim.iter( config.filetypes ):find( match )
100 + end )
101 + :totable()
102 - debug.print( 'POTENTIAL CLIENTS',
103 - vim.iter( potential_client_configs ):map( function ( config )
104 - return {
105 - name = config.name,
106 - command =
107 - config.command,
108 - }
109 - end )
110 - :totable() )
103 + debug.print( 'POTENTIAL CLIENTS',
104 + vim.iter( potential_client_configs ):map( function ( config )
105 + return {
106 + name = config.name,
107 + command =
108 + config.command,
110 + end )
111 + :totable() )
112 - if table.is_empty( potential_client_configs ) then
113 - debug.print( 'found no lsp client for', buffer_path )
114 - return
115 - end
113 + if table.is_empty( potential_client_configs ) then
114 + debug.print( 'found no lsp client for', buffer_path )
115 + return
116 + end
117 - -- TODO: LspStart
118 - -- TODO: LspStop
118 + --NOTE: this is super kool but has the limitation, that only lsp clients
119 + -- configured via my special lsp module are affected.
120 + local project_local_lsp_settings = localrc( '.lsp.settings.lua', 'table' ) or {}
120 - --NOTE: this is super kool but has the limitation, that only lsp clients
121 - -- configured via my special lsp module are affected.
122 - local project_local_lsp_settings = localrc( '.lsp.settings.lua', 'table' ) or {}
122 + for _, config in ipairs( potential_client_configs ) do
123 + local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
124 + local capabilities = vim.lsp.protocol.make_client_capabilities()
125 + capabilities = table.extend( 'force', capabilities, config.capabilities )
124 - for _, config in ipairs( potential_client_configs ) do
125 - local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
126 - local capabilities = vim.lsp.protocol.make_client_capabilities()
127 - capabilities = table.extend( 'force', capabilities, config.capabilities )
127 + local settings = config.settings
128 + local settings_override = project_local_lsp_settings[config.name]
129 + if settings_override then
130 + debug.print( 'overriding settings with project local settings', settings, settings_override )
131 + settings = vim.tbl_deep_extend( 'force', settings, settings_override )
132 + end
129 - local settings = config.settings
130 - local settings_override = project_local_lsp_settings[config.name]
131 - if settings_override then
132 - debug.print( 'overriding settings with project local settings', settings, settings_override )
133 - settings = vim.tbl_deep_extend( 'force', settings, settings_override )
134 - end
134 + debug.print( 'starting command:', config.command )
136 - debug.print( 'starting command:', config.command )
136 + local start_config = {
137 + cmd = config.command,
138 + cmd_cwd = root_dir,
139 + -- cmd_env = config.environment,
140 + detached = false, -- do i want this?
141 + root_dir = root_dir,
142 + -- workspace_folders = { config.root_dir(buffer_path) }, -- TODO: i think workspaces can only ever be declared per project. i cannot think of a generic way to calculate those, like with root_dir. maybe a toml/ini file in root_dir sets these?
143 + capabilities = capabilities,
144 + -- handlers = vim.lsp.handlers,
145 + settings = settings,
146 + -- commands = nil, -- what is this?
147 + init_options = config.init_options,
148 + name = config.name,
149 + -- get_language_id = nil,
150 + -- offset_encoding = nil,
151 + on_error = function ( code, ... ) vim.print( 'LSP ERROR', code, ... ) end,
152 + before_init = config.before_init,
153 + -- on_init = nil, -- should i send workspace/didChangeConfiguration here?
154 + on_exit = function ( code, signal, client_id ) debug.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
155 + on_attach = function ( client, attach_bufnr ) debug.print( 'LSP CLIENT ATTACH', client, attach_bufnr ) end,
156 + trace = debug.get() and 'on' or 'off',
157 + flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200, },
138 - local start_config = {
139 - cmd = config.command,
140 - cmd_cwd = root_dir,
141 - -- cmd_env = config.environment,
142 - detached = false, -- do i want this?
143 - root_dir = root_dir,
144 - -- workspace_folders = { config.root_dir(buffer_path) }, -- TODO: i think workspaces can only ever be declared per project. i cannot think of a generic way to calculate those, like with root_dir. maybe a toml/ini file in root_dir sets these?
145 - capabilities = capabilities,
146 - -- handlers = vim.lsp.handlers,
147 - settings = settings,
148 - -- commands = nil, -- what is this?
149 - init_options = config.init_options,
150 - name = config.name,
151 - -- get_language_id = nil,
152 - -- offset_encoding = nil,
153 - on_error = function ( code, ... ) vim.print( 'LSP ERROR', code, ... ) end,
154 - before_init = config.before_init,
155 - -- on_init = nil, -- should i send workspace/didChangeConfiguration here?
156 - on_exit = function ( code, signal, client_id ) debug.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
157 - on_attach = function ( client, attach_bufnr ) debug.print( 'LSP CLIENT ATTACH', client, attach_bufnr ) end,
158 - trace = debug.get() and 'on' or 'off',
159 - flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200, },
160 - }
160 + local lsp_starter = config.custom_start or vim.lsp.start
162 - local lsp_starter = config.custom_start or vim.lsp.start
162 + debug.print( 'starting lsp', start_config.name, root_dir )
164 - debug.print( 'starting lsp', start_config.name, root_dir )
164 + lsp_starter( start_config, {
165 + bufnr = bufnr,
166 + -- TODO: reuse if workspaces
167 + -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
168 + reuse_client = function ( existing_client, new_config )
169 + debug.print(
170 + 'lsp resuse client',
171 + existing_client.name,
172 + existing_client.workspace_folders,
173 + new_config.name,
174 + new_config.root_dir
166 - lsp_starter( start_config, {
167 - bufnr = bufnr,
168 - -- TODO: reuse if workspaces
169 - -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
170 - reuse_client = function ( existing_client, new_config )
171 - debug.print(
172 - 'lsp resuse client',
173 - existing_client.name,
174 - existing_client.workspace_folders,
175 - new_config.name,
176 - new_config.root_dir
177 - )
177 + --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
178 + local same_name = existing_client.name == new_config.name
179 - --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
180 - local same_name = existing_client.name == new_config.name
180 + local new_root_raw = new_config.root_dir or nil
181 + local existing_root_raw = existing_client.workspace_folders and #existing_client.workspace_folders >= 1 and
182 + existing_client.workspace_folders[1].name or nil
182 - local new_root_raw = new_config.root_dir or nil
183 - local existing_root_raw = existing_client.workspace_folders and #existing_client.workspace_folders >= 1 and
184 - existing_client.workspace_folders[1].name or nil
184 + if not (new_root_raw and existing_root_raw) then return false end
186 - if not (new_root_raw and existing_root_raw) then return false end
186 + local new_root = vim.fs.normalize( new_root_raw )
187 + local existing_root = vim.fs.normalize( existing_root_raw )
188 + local same_root = new_root == existing_root
188 - local new_root = vim.fs.normalize( new_root_raw )
189 - local existing_root = vim.fs.normalize( existing_root_raw )
190 - local same_root = new_root == existing_root
190 + local reuse = same_name and same_root
191 + debug.print( 'reusing lsp client?', reuse )
192 + return reuse
193 + end,
194 + } )
192 - local reuse = same_name and same_root
193 - debug.print( 'reusing lsp client?', reuse )
194 - return reuse
195 - end,
196 - } )
198 - debug.print( 'ATTACHING LSP CLIENT', config.name )
199 - end
196 + debug.print( 'ATTACHING LSP CLIENT', config.name )
197 + end
202 200 local old_formatexpr
206 204 local keybinds = {}
207 205 local add = function ( client_id, keybind_remover )
208 - vim.validate {
209 - client_id = { client_id, 'number', },
210 - keybind_remover = { keybind_remover, 'function', },
211 - }
212 - if not table.contains( keybinds, client_id ) then
213 - keybinds[client_id] = {}
214 - end
215 - table.insert( keybinds[client_id], keybind_remover )
206 + vim.validate {
207 + client_id = { client_id, 'number', },
208 + keybind_remover = { keybind_remover, 'function', },
210 + if not table.contains( keybinds, client_id ) then
211 + keybinds[client_id] = {}
212 + end
213 + table.insert( keybinds[client_id], keybind_remover )
218 216 local lsp_attach = function ( args )
219 - local bufnr = args.buf
220 - local client_id = args.data.client_id
221 - local client = vim.lsp.get_client_by_id( client_id )
222 - if not client then return end
217 + local bufnr = args.buf
218 + local client_id = args.data.client_id
219 + local client = vim.lsp.get_client_by_id( client_id )
220 + if not client then return end
224 - debug.print( client.server_capabilities )
222 + debug.print( client.server_capabilities )
226 - if client.server_capabilities.definitionProvider then
227 - old_tagfunc = vim.bo[bufnr].tagfunc
228 - vim.bo[bufnr].tagfunc = 'v:lua.vim.lsp.tagfunc'
229 - end
224 + if client.server_capabilities.definitionProvider then
225 + old_tagfunc = vim.bo[bufnr].tagfunc
226 + vim.bo[bufnr].tagfunc = 'v:lua.vim.lsp.tagfunc'
227 + end
231 - if client.server_capabilities.documentFormattingProvider then
232 - old_formatexpr = vim.bo[bufnr].formatexpr
233 - vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr'
234 - end
229 + if client.server_capabilities.documentFormattingProvider then
230 + old_formatexpr = vim.bo[bufnr].formatexpr
231 + vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr'
232 + end
236 - if client.server_capabilities.completionProvider then
237 - old_omnifunc = vim.bo[bufnr].omnifunc
238 - vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
239 - end
234 + if client.server_capabilities.completionProvider then
235 + old_omnifunc = vim.bo[bufnr].omnifunc
236 + vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
237 + end
241 - if client.server_capabilities.documentSymbolProvider then
242 - local navic_ok, navic = pcall( require, 'nvim-navic' )
243 - if navic_ok then
244 - navic.attach( client, bufnr )
245 - else
246 - vim.notify 'nvim-navic not found. could not attach to lsp client.'
247 - end
248 - local navbuddy_ok, navbuddy = pcall( require, 'nvim-navbuddy' )
249 - if navbuddy_ok then
250 - navbuddy.attach( client, bufnr )
251 - map.normal {
252 - description = 'Open overview of symbols in current buffer',
253 - category = 'lsp',
254 - keys = '<leader>lo',
255 - command = function () navbuddy.open( bufnr ) end,
256 - buffer = bufnr,
257 - }
258 - else
259 - vim.notify 'nvim-navbuddy not found. could not attach to lsp client.'
260 - end
261 - end
239 + if client.server_capabilities.documentSymbolProvider then
240 + local navic_ok, navic = pcall( require, 'nvim-navic' )
241 + if navic_ok then
242 + navic.attach( client, bufnr )
243 + else
244 + vim.notify 'nvim-navic not found. could not attach to lsp client.'
245 + end
246 + local navbuddy_ok, navbuddy = pcall( require, 'nvim-navbuddy' )
247 + if navbuddy_ok then
248 + navbuddy.attach( client, bufnr )
249 + map.normal {
250 + description = 'Open overview of symbols in current buffer',
251 + category = 'lsp',
252 + keys = '<leader>lo',
253 + command = function () navbuddy.open( bufnr ) end,
254 + buffer = bufnr,
256 + else
257 + vim.notify 'nvim-navbuddy not found. could not attach to lsp client.'
258 + end
259 + end
263 - local lsp_signature_ok, lsp_signature = pcall( require, 'lsp_signature' )
264 - if lsp_signature_ok then
265 - lsp_signature.on_attach( {}, bufnr )
266 - end
261 + local lsp_signature_ok, lsp_signature = pcall( require, 'lsp_signature' )
262 + if lsp_signature_ok then
263 + lsp_signature.on_attach( {}, bufnr )
264 + end
268 - if client.server_capabilities.documentHighlightProvider then
269 - -- the timer has application lifetime. no need to close
270 - local delay = 300
271 - local debounced_highlight = defer.debounce_leading( vim.lsp.buf.document_highlight, delay )
272 - local debounced_clear = defer.debounce_leading( vim.lsp.buf.clear_references, delay )
266 + if client.server_capabilities.documentHighlightProvider then
267 + -- the timer has application lifetime. no need to close
268 + local delay = 300
269 + local debounced_highlight = defer.debounce_leading( vim.lsp.buf.document_highlight, delay )
270 + local debounced_clear = defer.debounce_leading( vim.lsp.buf.clear_references, delay )
274 - auto 'document_highlight' {
275 - {
276 - description = 'Highlight symbol under cursor on hold',
277 - events = 'CursorHold',
278 - buffer = bufnr,
279 - command = debounced_highlight,
280 - },
281 - {
282 - description = 'Remove highlight from symbol under cursor on move',
283 - events = { 'CursorMoved', 'InsertEnter', },
284 - buffer = bufnr,
285 - command = debounced_clear,
286 - },
287 - }
288 - end
272 + auto 'document_highlight' {
274 + description = 'Highlight symbol under cursor on hold',
275 + events = 'CursorHold',
276 + buffer = bufnr,
277 + command = debounced_highlight,
278 + },
280 + description = 'Remove highlight from symbol under cursor on move',
281 + events = { 'CursorMoved', 'InsertEnter', },
282 + buffer = bufnr,
283 + command = debounced_clear,
284 + },
286 + end
290 - if client.server_capabilities.inlayHintProvider then
291 - add( client_id, map.normal {
292 - description = 'Toggle inlay hints',
293 - category = 'lsp',
294 - buffer = bufnr,
295 - keys = '<leader>ti',
296 - command = function ()
297 - vim.lsp.inlay_hint.enable( bufnr, nil )
298 - end,
299 - } )
300 - end
288 + if client.server_capabilities.inlayHintProvider then
289 + add( client_id, map.normal {
290 + description = 'Toggle inlay hints',
291 + category = 'lsp',
292 + buffer = bufnr,
293 + keys = '<leader>ti',
294 + command = function ()
295 + vim.lsp.inlay_hint.enable( bufnr, nil )
296 + end,
297 + } )
298 + end
302 - add( client_id, map.normal {
303 - description = 'Show hover documentation above cursor.',
304 - category = 'lsp',
305 - buffer = bufnr,
306 - keys = { 'K', '<leader>lk', },
307 - command = vim.lsp.buf.hover,
308 - } )
300 + add( client_id, map.normal {
301 + description = 'Show hover documentation above cursor.',
302 + category = 'lsp',
303 + buffer = bufnr,
304 + keys = { 'K', '<leader>lk', },
305 + command = vim.lsp.buf.hover,
306 + } )
310 - add( client_id, map.normal {
311 - description = 'Show signature help under cursor.',
312 - category = 'lsp',
313 - buffer = bufnr,
314 - keys = { 'H', '<leader>ls', },
315 - command = vim.lsp.buf.signature_help,
316 - } )
308 + add( client_id, map.normal {
309 + description = 'Show signature help under cursor.',
310 + category = 'lsp',
311 + buffer = bufnr,
312 + keys = { 'H', '<leader>ls', },
313 + command = vim.lsp.buf.signature_help,
314 + } )
318 - add( client_id, map.normal {
319 - description = 'Show available code actions on current line.',
320 - category = 'lsp',
321 - buffer = bufnr,
322 - keys = '<leader>la',
323 - command = vim.lsp.buf.code_action,
324 - } )
316 + add( client_id, map.normal {
317 + description = 'Show available code actions on current line.',
318 + category = 'lsp',
319 + buffer = bufnr,
320 + keys = '<leader>la',
321 + command = vim.lsp.buf.code_action,
322 + } )
326 - add( client_id, map.normal {
327 - description = 'Goto to definition of symbol under cursor.',
328 - category = 'lsp',
329 - buffer = bufnr,
330 - keys = '<leader>ld',
331 - command = vim.lsp.buf.definition,
332 - } )
324 + add( client_id, map.normal {
325 + description = 'Goto to definition of symbol under cursor.',
326 + category = 'lsp',
327 + buffer = bufnr,
328 + keys = '<leader>ld',
329 + command = vim.lsp.buf.definition,
330 + } )
334 - add( client_id, map.normal {
335 - description = 'Show implementations of symbol under cursor.',
336 - category = 'lsp',
337 - buffer = bufnr,
338 - keys = '<leader>li',
339 - command = vim.lsp.buf.implementation,
340 - } )
332 + add( client_id, map.normal {
333 + description = 'Show implementations of symbol under cursor.',
334 + category = 'lsp',
335 + buffer = bufnr,
336 + keys = '<leader>li',
337 + command = vim.lsp.buf.implementation,
338 + } )
342 - add( client_id, map.normal {
343 - description = 'Show incoming calls of symbol under cursor.',
344 - category = 'lsp',
345 - buffer = bufnr,
346 - keys = '<leader>lci',
347 - command = vim.lsp.buf.incoming_calls,
348 - } )
340 + add( client_id, map.normal {
341 + description = 'Show incoming calls of symbol under cursor.',
342 + category = 'lsp',
343 + buffer = bufnr,
344 + keys = '<leader>lci',
345 + command = vim.lsp.buf.incoming_calls,
346 + } )
350 - add( client_id, map.normal {
351 - description = 'Show outgoing calls of symbol under cursor.',
352 - category = 'lsp',
353 - buffer = bufnr,
354 - keys = '<leader>lco',
355 - command = vim.lsp.buf.outgoing_calls,
356 - } )
348 + add( client_id, map.normal {
349 + description = 'Show outgoing calls of symbol under cursor.',
350 + category = 'lsp',
351 + buffer = bufnr,
352 + keys = '<leader>lco',
353 + command = vim.lsp.buf.outgoing_calls,
354 + } )
358 - add( client_id, map.normal {
359 - description = 'Show references of symbol under cursor.',
360 - category = 'lsp',
361 - buffer = bufnr,
362 - keys = '<leader>ln',
363 - command = vim.lsp.buf.references,
364 - } )
356 + add( client_id, map.normal {
357 + description = 'Show references of symbol under cursor.',
358 + category = 'lsp',
359 + buffer = bufnr,
360 + keys = '<leader>ln',
361 + command = vim.lsp.buf.references,
362 + } )
366 - add( client_id, map.normal {
367 - description = 'Rename symbol under cursor.',
368 - category = 'lsp',
369 - buffer = bufnr,
370 - keys = { '<f2>', '<leader>lr', },
371 - command = vim.lsp.buf.rename,
372 - } )
364 + add( client_id, map.normal {
365 + description = 'Rename symbol under cursor.',
366 + category = 'lsp',
367 + buffer = bufnr,
368 + keys = { '<f2>', '<leader>lr', },
369 + command = vim.lsp.buf.rename,
370 + } )
375 373 local lsp_detach = function ( args )
376 - debug.print( 'DETACH LSP', args )
374 + debug.print( 'DETACH LSP', args )
378 - local bufnr = args.buf
379 - local client_id = args.data.client_id
380 - local client = vim.lsp.get_client_by_id( client_id )
381 - if not client then return end
376 + local bufnr = args.buf
377 + local client_id = args.data.client_id
378 + local client = vim.lsp.get_client_by_id( client_id )
379 + if not client then return end
383 - if client.server_capabilities.definitionProvider then
384 - vim.bo[bufnr].tagfunc = old_tagfunc
385 - end
381 + if client.server_capabilities.definitionProvider then
382 + vim.bo[bufnr].tagfunc = old_tagfunc
383 + end
387 - if client.server_capabilities.documentFormattingProvider then
388 - vim.bo[bufnr].formatexpr = old_formatexpr
389 - end
385 + if client.server_capabilities.documentFormattingProvider then
386 + vim.bo[bufnr].formatexpr = old_formatexpr
387 + end
391 - if client.server_capabilities.completionProvider then
392 - vim.bo[bufnr].omnifunc = old_omnifunc
393 - end
389 + if client.server_capabilities.completionProvider then
390 + vim.bo[bufnr].omnifunc = old_omnifunc
391 + end
395 - if table.contains( keybinds, client_id ) then
396 - for _, keybind_delete in ipairs( keybinds[client_id] ) do
397 - keybind_delete()
398 - end
399 - end
393 + if table.contains( keybinds, client_id ) then
394 + for _, keybind_delete in ipairs( keybinds[client_id] ) do
395 + keybind_delete()
396 + end
397 + end
402 400 auto 'lsp' {
403 - {
404 - description = 'Start or reuse LSP client',
405 - events = 'FileType',
406 - command = lsp_start,
407 - },
408 - {
409 - description = 'Hook: LSP client attached to buffer',
410 - events = 'LspAttach',
411 - command = lsp_attach,
412 - },
413 - {
414 - description = 'Hook: LSP client detached from buffer',
415 - events = 'LspDetach',
416 - command = lsp_detach,
417 - },
418 - {
419 - description = 'Semantic Tokens from the LSP',
420 - events = 'LspTokenUpdate',
421 - command = token_update,
422 - },
402 + description = 'Start or reuse LSP client',
403 + events = 'FileType',
404 + command = lsp_start,
405 + },
407 + description = 'Hook: LSP client attached to buffer',
408 + events = 'LspAttach',
409 + command = lsp_attach,
410 + },
412 + description = 'Hook: LSP client detached from buffer',
413 + events = 'LspDetach',
414 + command = lsp_detach,
415 + },
417 + description = 'Semantic Tokens from the LSP',
418 + events = 'LspTokenUpdate',
419 + command = token_update,
420 + },
425 423 local lsp_info = function ( command )
426 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
427 - local active_clients = vim.lsp.get_clients( all_or_current )
424 + local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
425 + local active_clients = vim.lsp.get_clients( all_or_current )
429 - local infos = vim.iter( active_clients )
430 - :map( function ( client )
431 - local name = client.name
432 - local config = vim.iter( lsp_client_configs ):find( function ( config ) return config.name == name end )
433 - assert( config, ('How did we not find a config for %s ?!?!'):format( name ) )
427 + local infos = vim.iter( active_clients )
428 + :map( function ( client )
429 + local name = client.name
430 + local config = vim.iter( lsp_client_configs ):find( function ( config ) return config.name == name end )
431 + assert( config, ('How did we not find a config for %s ?!?!'):format( name ) )
435 - local full_cmd = table.deep_copy( client.config.cmd )
436 - full_cmd[1] = vim.fn.exepath( full_cmd[1] )
437 - local basic = {
438 - id = client.id,
439 - name = name,
440 - cmd = table.concat( full_cmd, ' ' ),
441 - workspace_folders = vim.iter( client.workspace_folders ):map( function ( w ) return vim.fs.normalize( w.name ) end )
442 - :totable(),
443 - filetypes = table.concat( config.filetypes, ', ' ),
444 - single_file_support = config.single_file_support,
445 - workspaces = config.workspaces,
446 - }
447 - return basic
448 - end )
449 - :totable()
433 + local full_cmd = table.deep_copy( client.config.cmd )
434 + full_cmd[1] = vim.fn.exepath( full_cmd[1] )
435 + local basic = {
436 + id = client.id,
437 + name = name,
438 + cmd = table.concat( full_cmd, ' ' ),
439 + workspace_folders = vim.iter( client.workspace_folders ):map( function ( w ) return vim.fs.normalize( w.name ) end )
440 + :totable(),
441 + filetypes = table.concat( config.filetypes, ', ' ),
442 + single_file_support = config.single_file_support,
443 + workspaces = config.workspaces,
445 + return basic
446 + end )
447 + :totable()
451 - ui.show_tree( infos )
449 + ui.show_tree( infos )
454 452 local lsp_info_extended = function ( command )
455 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
456 - local active_clients = vim.lsp.get_clients( all_or_current )
457 - ui.show_tree( active_clients )
453 + local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
454 + local active_clients = vim.lsp.get_clients( all_or_current )
455 + ui.show_tree( active_clients )
460 -user_command( 'LspInfo', lsp_info, {
461 - nargs = '?',
462 - complete = function () return { 'all', } end,
463 - desc = 'Shows basic information about running LSP clients.',
464 -} )
458 +user_command.LspInfo
459 +'Shows basic information about running LSP clients.'
460 + { nargs = '?', complete = function () return { 'all', } end, } (
461 + lsp_info
466 -user_command( 'LspInfoExtended', lsp_info_extended, {
467 - nargs = '?',
468 - complete = function () return { 'all', } end,
469 - desc = 'Shows detailed information about running LSP clients.',
470 -} )
464 +user_command.LspInfoExtended
465 +'Shows detailed information about running LSP clients.'
466 + { nargs = '?', complete = function () return { 'all', } end, } (
467 + lsp_info_extended
472 --- TODO: lsp restart, lsp exit
470 +-- TODO: LspStart
471 +-- TODO: LspStop
472 +-- TODO: LspRestart ? Maybe good after changing project local settings?
474 --- TODO: move to std.icons.lua
475 474 local completion_icons = {
476 - Class = ' ',
477 - Color = ' ',
478 - Constant = ' ',
479 - Constructor = ' ',
480 - Enum = ' ',
481 - EnumMember = ' ',
482 - Field = '󰄶 ',
483 - File = ' ',
484 - Folder = ' ',
485 - Function = ' ',
486 - Interface = '󰜰',
487 - Keyword = '󰌆 ',
488 - Method = 'ƒ ',
489 - Module = '󰏗 ',
490 - Property = ' ',
491 - Snippet = '󰘍 ',
492 - Struct = ' ',
493 - Text = ' ',
494 - Unit = ' ',
495 - Value = '󰎠 ',
496 - Variable = ' ',
475 + Class = icon.class,
476 + Color = icon.color,
477 + Constant = icon.constant,
478 + Constructor = icon.constructor,
479 + Enum = icon.enum,
480 + EnumMember = icon.enum_member,
481 + Field = icon.field,
482 + File = icon.file,
483 + Folder = icon.folder,
484 + Function = icon['function'],
485 + Interface = icon.interface,
486 + Keyword = icon.keyword,
487 + Method = icon.method,
488 + Module = icon.module,
489 + Property = icon.property,
490 + Snippet = icon.snippet,
491 + Struct = icon.struct,
492 + Text = icon.text,
493 + Unit = icon.unit,
494 + Value = icon.value,
495 + Variable = icon.variable,
499 498 local completion_kinds = vim.lsp.protocol.CompletionItemKind
500 499 for i, kind in ipairs( completion_kinds ) do
501 - completion_kinds[i] = completion_icons[kind] or kind
500 + completion_kinds[i] = completion_icons[kind] or kind
504 503 return setmetatable( _, {} )

neovim/lua/bugabinga/options/commands.lua

Modified
1 1 local light_up = require 'std.light_up'
2 +local user_command = require 'std.user_command'
3 4 local light_up_current_buffer = function ()
4 5 local group_names = light_up.get_vim_highlight_groups()
5 6 light_up.buffer( 0, group_names )
8 -vim.api.nvim_create_user_command(
9 - 'LightUp',
10 - light_up_current_buffer,
11 - {}
12 -)
9 +user_command.LightUp
10 +'Highlight hl-group names in current buffer' (
11 + light_up_current_buffer
12 + )

neovim/lua/bugabinga/plugins/cmp.lua

Modified
1 1 local map = require 'std.map'
2 +local user_command = require 'std.user_command'
3 4 map.insert {
4 5 description = 'Trigger cmp autocomplete',
7 8 command = function () prequire 'cmp'.complete() end,
10 -vim.api.nvim_create_user_command( 'CmpInfo', function ()
11 - prequire 'cmp'.status()
12 - end, {} )
11 +user_command.CmpInfo
12 +'Display status information about the completion engine cmp' (
13 + prequire 'cmp'.status
14 + )
14 16 return {
15 17 'hrsh7th/nvim-cmp',

neovim/lua/bugabinga/plugins/colorizer.lua

Modified
15 15 css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
16 16 -- Available modes for `mode`: foreground, background, virtualtext
17 17 mode = 'virtualtext', -- Set the display mode.
18 - names = function () return require 'bugabinga.nugu.palette' end,
18 + -- names = function () return require 'bugabinga.nugu.palette' end,
19 19 -- parsers can contain values used in |user_default_options|
20 20 sass = { enable = false, parsers = { 'css', }, }, -- Enable sass colors
21 21 virtualtext = '██',

neovim/lua/bugabinga/plugins/format.lua

Modified
1 1 local debug = require 'std.debug'
2 2 local map = require 'std.map'
3 +local user_command = require 'std.user_command'
4 5 local format = function ()
5 6 prequire 'conform'.format( { async = false, lsp_fallback = true, }, function ( err )
16 17 command = format,
19 ---TODO: make user command Format
20 -vim.api.nvim_create_user_command( 'Format', format, {} )
20 +user_command.Format
21 +'Format the current buffer' (
22 + format
23 + )
22 25 return {
23 26 'stevearc/conform.nvim',

neovim/lua/bugabinga/plugins/neodev.lua

Added
new file mode 100644
1 +return {
2 + 'folke/neodev.nvim',
3 + opts = {
4 + -- With lspconfig, Neodev will automatically setup your lua-language-server
5 + -- If you disable this, then you have to set {before_init=require("neodev.lsp").before_init}
6 + -- in your lsp start options
7 + lspconfig = false,
8 + },
9 +}

neovim/lua/bugabinga/plugins/snippets.lua

Modified
4 4 --FIXME: own this
5 5 return {
6 6 'L3MON4D3/LuaSnip',
7 7 dependencies = {
8 8 'stevearc/vim-vscode-snippets',
10 - event = 'InsertEnter *',
11 10 config = function ()
12 - local luasnip = require 'luasnip'
11 + local luasnip = require 'luasnip'
13 12 local has_vim_snippet, snippet = pcall( require, 'vim.snippet' )
14 - require 'luasnip.loaders.from_vscode' .lazy_load()
15 - vim.keymap.set( 's', '<Tab>', '<Plug>luasnip-jump-next' )
16 - vim.keymap.set( 's', '<C-h>', '<Plug>luasnip-jump-prev' )
17 - vim.keymap.set( 's', '<C-l>', '<Plug>luasnip-jump-next' )
13 + require 'luasnip.loaders.from_vscode'.lazy_load()
14 + vim.keymap.set( 's', '<Tab>', '<Plug>luasnip-jump-next' )
15 + vim.keymap.set( 's', '<C-h>', '<Plug>luasnip-jump-prev' )
16 + vim.keymap.set( 's', '<C-l>', '<Plug>luasnip-jump-next' )
18 17 vim.keymap.set( { 'i', 's', }, '<C-k>', function () pcall( luasnip.change_choice, -1 ) end )
19 18 vim.keymap.set( { 'i', 's', }, '<C-j>', function () pcall( luasnip.change_choice, 1 ) end )
22 21 pattern = '*',
23 22 group = aug,
24 23 callback = function ()
25 - vim.cmd.LuaSnipUnlinkCurrent { mods = { emsg_silent = true, }, }
24 + vim.cmd.LuaSnipUnlinkCurrent { mods = { emsg_silent = true, }, }
26 25 if has_vim_snippet then
27 26 snippet.exit()
53 52 -- Required to support nested placeholders
54 53 -- From https://github.com/L3MON4D3/LuaSnip/wiki/Nice-Configs#imitate-vscodes-behaviour-for-nested-placeholders
55 - local util = require 'luasnip.util.util'
54 + local util = require 'luasnip.util.util'
57 - luasnip.config.setup {
56 + luasnip.config.setup {
58 57 store_selection_keys = '<Tab>',
59 58 updateevents = 'TextChanged,TextChangedI',
60 59 parser_nested_assembler = function ( _, snippet )

neovim/lua/bugabinga/plugins/ssr.lua

Modified
1 1 local map = require 'std.map'
2 +local user_command = require 'std.user_command'
3 -local open_ssr = function () require 'ssr'.open() end
4 +local open_ssr = function () prequire 'ssr'.open() end
5 6 map.normal.visual {
6 - description = 'Open structural search and replace',
7 - category = 'refactoring',
8 - keys = '<leader>rr',
9 - command = open_ssr,
7 + description = 'Open structural search and replace',
8 + category = 'refactoring',
9 + keys = '<leader>rr',
10 + command = open_ssr,
12 -vim.api.nvim_create_user_command( 'StructuralSearchAndReplace', open_ssr, { bang = true, } )
13 +user_command.StructuralSearchAndReplace
14 +'Open structural search and replace view' (
15 + open_ssr
16 + )
14 18 return {
15 - 'cshuaimin/ssr.nvim',
16 - cmd = 'StructuralSearchAndReplace',
17 - opts = {
18 - border = vim.g.border_style,
19 - min_width = 69,
20 - min_height = 42,
21 - max_width = 3 * 69,
22 - max_height = 3 * 42,
23 - adjust_window = true,
24 - keymaps = {
25 - close = 'q',
26 - next_match = 'n',
27 - prev_match = 'N',
28 - replace_confirm = '<cr>',
29 - replace_all = '<c-cr>',
30 - },
31 - },
19 + 'cshuaimin/ssr.nvim',
20 + opts = {
21 + border = vim.g.border_style,
22 + min_width = 69,
23 + min_height = 42,
24 + max_width = 3 * 69,
25 + max_height = 3 * 42,
26 + adjust_window = true,
27 + keymaps = {
28 + close = 'q',
29 + next_match = 'n',
30 + prev_match = 'N',
31 + replace_confirm = '<cr>',
32 + replace_all = '<c-cr>',
33 + },
34 + },

neovim/lua/bugabinga/plugins/surround.lua

Modified
1 1 return {
2 2 'kylechui/nvim-surround',
3 - keys = {
4 - { 'ms', mode = 'n', },
5 - { 'mss', mode = 'n', },
6 - { 'mS', mode = 'n', },
7 - { 'mSS', mode = 'n', },
9 - { 'ms', mode = 'x', },
10 - { 'mS', mode = 'x', },
12 - { 'md', mode = 'n', },
13 - { 'mc', mode = 'n', },
14 - { 'mC', mode = 'n', },
15 - },
3 + event = 'VeryLazy',
16 4 opts = {
17 5 keymaps = {
6 + insert = '<C-g>ms',
7 + insert_line = '<C-g>mS',
18 8 normal = 'ms',
19 9 normal_cur = 'mss',
20 10 normal_line = 'mS',

neovim/lua/bugabinga/plugins/window.lua

Modified
1 1 local map = require 'std.map'
2 +local user_command = require 'std.user_command'
3 4 map.normal {
4 5 description = 'Open window picker...',
7 8 command = function () require 'nvim-window'.pick() end,
10 -vim.api.nvim_create_user_command( 'PickWindow', function () require 'nvim-window'.pick() end, { bang = true, } )
11 +user_command.PickWindow
12 +'Pick a window with a simple char motion' (
13 + prequire 'nvim-window'.pick
14 + )
12 16 return {
13 17 'yorickpeterse/nvim-window',
14 18 opts = {
15 - -- from wezterm for easz qwerty moitions
19 + -- from wezterm for easy qwerty motions
16 20 chars = { 'a', 's', 'd', 'f', 'q', 'w', 'e', 'r', 'z', 'x', 'c', 'v', 'j', 'k', 'l', 'm', 'i', 'u', 'o', 'p', 'g', 'h', 't', 'y', 'b', 'n', },
17 21 border = vim.g.border_style,
18 22 normal_hl = 'NormalFloat',

neovim/lua/bugabinga/save_actions.lua

Modified
1 1 local map = require 'std.map'
2 2 local localrc = require 'std.localrc'
3 +local user_command = require 'std.user_command'
4 5 local global_actions = vim.g.save_actions or {}
5 6 local project_local_actions = localrc( '.save.actions.lua', 'table' ) or {}
6 7 local all_actions = vim.tbl_deep_extend( 'force', global_actions, project_local_actions )
8 -local apply_save_actions = function ( options )
9 - options = options or {}
9 +local apply_save_actions = function ()
11 10 vim.iter( all_actions ):each(
12 11 function ( action )
13 12 vim.validate {
14 13 action = { action, 'string', },
16 - local user_command = vim.api.nvim_parse_cmd( action, {} )
17 - vim.api.nvim_cmd( user_command, { output = not options.bang, } )
15 + local parsed_command = vim.api.nvim_parse_cmd( action, {} )
16 + vim.api.nvim_cmd( parsed_command, { output = true, } )
22 21 vim.cmd [[wa]]
25 -vim.api.nvim_create_user_command( 'SaveActions', apply_save_actions, { bang = true, } )
24 +user_command.SaveActions 'Execute all declared save actions' ( apply_save_actions )
27 26 map.normal.visual {
28 27 description = 'Save all buffers and apply save actions',

neovim/lua/std/debug.lua

Modified
1 +local user_command = require 'std.user_command'
1 3 if vim.g.bugabinga_debug_mode == nil then
2 4 vim.g.bugabinga_debug_mode = false
18 20 vim.notify( 'Toggled debug mode to ' .. tostring( is_debug_mode() ) )
21 -vim.api.nvim_create_user_command( 'Debug', toggle_debug_mode, {} )
23 +user_command.Debug 'Toggle global vim config debug mode.' ( toggle_debug_mode )
23 25 return {
24 26 print = print_debug,

neovim/lua/std/icon.lua

Modified
10 10 carriage_return = '␍',
11 11 checkbox_mark = '',
12 12 checkbox_unmark = '',
13 + class = ' ',
13 14 close = '',
15 + color = ' ',
14 16 command = '󰘳',
17 + constant = ' ',
18 + constructor = ' ',
15 19 data = '',
16 20 diagnostic = '⊙',
17 21 diff_add = '',
18 22 diff_change = '',
19 23 diff_remove = '',
24 + enum = ' ',
25 + enum_member = ' ',
20 26 eol = '↴',
21 27 error = '󰇷',
22 28 esc_key = '󱊷',
23 29 exclaim = '',
24 30 extends = '❯',
25 31 failed = ' ',
32 + field = '󰄶 ',
26 33 file = '',
27 34 folder = '',
28 35 git = '',
32 39 hint = '',
33 40 info = '󰩖',
34 41 insert = '',
42 + interface = '󰜰',
43 + keyword = '󰌆 ',
35 44 lazy = '󰄻',
36 45 leader_key = '󱁐',
37 46 linehighlight = '󰘤',
39 48 lock = '',
40 49 lsp = '',
41 50 macro = '',
51 + method = 'ƒ ',
42 52 middle_ellipsis = '⋯',
43 53 modified = '',
54 + module = '󰏗 ',
44 55 nbsp = '␣',
45 56 newline = '␤',
46 57 normal = 'Ν',
57 68 progress_7 = '⠧',
58 69 progress_8 = '⠇',
59 70 progress_9 = '⠏',
71 + property = ' ',
60 72 quot_left = '"',
61 73 quot_right = '"',
62 74 replace = '',
65 77 select = '󰒉',
66 78 slant_left = '▟',
67 79 slant_right = '▙',
80 + snippet = '󰘍 ',
68 81 space = '·',
69 82 space_key = '󱁐',
70 83 spelling = '󰓆',
71 84 start = '',
85 + struct = ' ',
72 86 subversion = '󰳗',
73 87 tab = '󰌒',
74 88 tab_key = '',
75 89 telescope = '🔭',
76 90 terminal = '',
91 + text = ' ',
77 92 thread = '󱇫',
78 93 toggle_off = '',
79 94 toggle_on = '',
80 95 trail = '•',
96 + unit = ' ',
81 97 unknown = ' ',
82 98 user = ' ',
99 + value = '󰎠 ',
100 + variable = ' ',
83 101 vertical_bar = '│',
84 102 vim = '',
85 103 virtual = '󰢔',