repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: highlight return keyword

01c7f8ecc656221d2eea9bcc8c401aab37b5077d

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (9)

EJ-PC-00363.symlinks

Modified
16 16 stackoverflow/so
17 17 ~/AppData/Roaming/Sam Tay/so
19 -subversion/config
19 +subversion/config.win32
20 20 ~/AppData/Roaming/Subversion/config
22 +subversion/diff.bat
23 +~/AppData/Roaming/Subversion/diff.bat
25 +subversion/diff3.bat
26 +~/AppData/Roaming/Subversion/diff3.bat
28 +subversion/merge.bat
29 +~/AppData/Roaming/Subversion/merge.bat
22 31 cargo/config.toml
23 32 ~/scoop/persist/rustup/.cargo/config.toml

PC-00625.symlinks

Modified
19 19 subversion/config.win32
20 20 ~/AppData/Roaming/Subversion/config
22 -subversion/diff
23 -~/AppData/Roaming/Subversion/diff
25 -subversion/diff3
26 -~/AppData/Roaming/Subversion/diff3
28 -subversion/merge
29 -~/AppData/Roaming/Subversion/merge
31 22 subversion/diff.bat
32 23 ~/AppData/Roaming/Subversion/diff.bat

neovim/init.lua

Modified
8 8 -- ▀▀▀ █ █ ██ █
9 9 -- ▀ ▀
10 10 -- set general neovim editor settings
11 -require'bugabinga.options'
11 +require 'bugabinga.options'
12 12 -- install plugin manager and declare plugins to use
13 -require'bugabinga.lazy'
13 +require 'bugabinga.lazy'
14 14 -- configures the vim diagnostic subsystem
15 -require'bugabinga.diagnostic'
16 -require'bugabinga.trim'
17 -require'bugabinga.mark'
18 -require'bugabinga.lsp'
15 +require 'bugabinga.diagnostic'
16 +require 'bugabinga.trim'
17 +require 'bugabinga.mark'
18 +require 'bugabinga.lsp'
20 20 -- TODO:
21 --- [ ] highlight return keyword
21 +-- [] learn marks and refac mark.lua
22 22 -- [ ] use ltex-ls for markdown, code comments and commit messages
23 23 -- [ ] DAP
24 24 -- [ ] add nu-check to nvim-lint

neovim/lazy-lock.json

Modified
38 38 "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" },
39 39 "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
40 40 "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" },
41 - "nvim-treesitter": { "branch": "master", "commit": "f3fb301b267e85e4cbc725561da4a82b1c3089c8" },
41 + "nvim-treesitter": { "branch": "master", "commit": "b5873bacb4ce44e0aac313abb28bb72e67fc9a53" },
42 42 "nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
43 43 "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
44 44 "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" },

neovim/lua/bugabinga/lsp/init.lua

Modified
51 51 local lsp_start = function ( file_type_event )
52 - -- vim.print("LSP START", file_type_event)
54 52 local match = file_type_event.match
56 54 local matches_to_ignore = ignored.filetypes
60 58 local bufnr = file_type_event.buf
61 59 local buffer_path = vim.api.nvim_buf_get_name( bufnr )
63 - -- vim.print( "SEARCHING LSP CLIENT FOR:", match, buffer_path)
61 + vim.print( 'searching lsp client for:', match, bufnr, buffer_path )
65 63 local potential_client_configs = vim.iter( lsp_client_configs )
66 64 :map( function ( config )
107 105 for _, config in ipairs( potential_client_configs ) do
108 106 local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
109 107 local capabilities = vim.lsp.protocol.make_client_capabilities()
110 - local cmp_capabilities = want 'cmp_nvim_lsp' ( function ( cmp )
111 - return cmp.default_capabilities()
112 - end, {} )
108 + local cmp_capabilities = want 'cmp_nvim_lsp' ( function ( cmp ) return cmp.default_capabilities() end, {} )
113 109 capabilities = table.extend( 'force', capabilities, cmp_capabilities, config.capabilities )
114 110 -- vim.print( 'lsp capabilities', capabilities, config.capabilities, cmp_capabilities )
130 126 on_error = function ( code, ... ) vim.print( 'LSP ERROR', code, ... ) end,
131 127 before_init = config.before_init,
132 128 -- on_init = nil, -- should i send workspace/didChangeConfiguration here?
133 - -- on_exit = function(code, signal, client_id) vim.print("LSP CLIENT EXIT", code, signal, client_id) end,
129 + on_exit = function ( code, signal, client_id ) vim.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
134 130 -- on_attach = function(client, bufnr) vim.print("LSP CLIENT ATTACH", client.data.client_id, bufnr) end,
135 131 trace = 'off',
136 132 flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200 },
145 141 bufnr = bufnr,
146 142 -- TODO: reuse if workspaces
147 143 -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
148 - -- reuse_client = function ( existing_client, new_config )
149 - -- --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
150 - -- local same_name_and_root = existing_client.name == new_config.name and
151 - -- existing_client.workspace_folders[1] == new_config.root_dir;
152 - -- -- vim.print( 'resuing lsp client?', same_name_and_root )
153 - -- return same_name_and_root;
154 - -- end,
144 + reuse_client = function ( existing_client, new_config )
145 + -- vim.print(
146 + -- 'lsp resuse client',
147 + -- existing_client.name,
148 + -- existing_client.workspace_folders,
149 + -- new_config.name,
150 + -- new_config.root_dir
151 + -- )
153 + --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
154 + local same_name = existing_client.name == new_config.name
156 + local new_root = vim.fs.normalize( new_config.root_dir )
157 + local existing_root = vim.fs.normalize( existing_client.workspace_folders[1].name )
158 + local same_root = new_root == existing_root
160 + local reuse = same_name and same_root
161 + -- vim.print( 'reusing lsp client?', reuse )
162 + return reuse
163 + end,
157 166 -- vim.print("ATTACHING LSP CLIENT", client_id)
214 - -- if client.server_capabilities.inlayHintProvider then
215 - -- TODO: how to prevent the UI from jittering
216 - -- vim.lsp.inlay_hint( bufnr, true )
217 - -- end
223 + if client.server_capabilities.inlayHintProvider then
224 + -- TODO: how to prevent the UI from jittering
225 + add( map.normal {
226 + description = 'Toggle inlay hints',
227 + category = 'lsp',
228 + buffer = bufnr,
229 + keys = '<leader>ti',
230 + command = function () vim.lsp.inlay_hint( bufnr, nil ) end,
231 + } )
232 + end
219 - add(map.normal {
234 + add( map.normal {
220 235 description = 'Format current buffer',
221 236 category = 'lsp',
222 237 buffer = bufnr,
223 238 keys = '<c-s>',
224 239 --TODO: save actions
225 240 command = vim.lsp.buf.format,
226 - })
241 + } )
228 - add(map.normal {
243 + add( map.normal {
229 244 description = 'Show hover documentation above cursor.',
230 245 category = 'lsp',
231 246 buffer = bufnr,
232 247 keys = { 'K', '<leader>lk' },
233 248 command = vim.lsp.buf.hover,
234 - })
249 + } )
236 - add(map.normal {
251 + add( map.normal {
237 252 description = 'Show signature help under cursor.',
238 253 category = 'lsp',
239 254 buffer = bufnr,
240 255 keys = '<leader>ls',
241 256 command = vim.lsp.buf.signature_help,
242 - })
257 + } )
244 - add(map.normal {
259 + add( map.normal {
245 260 description = 'Show available code actions on current line.',
246 261 category = 'lsp',
247 262 buffer = bufnr,
248 263 keys = '<leader>la',
249 264 command = vim.lsp.buf.code_action,
250 - })
265 + } )
252 - add(map.normal {
267 + add( map.normal {
253 268 description = 'Goto to definition of symbol under cursor.',
254 269 category = 'lsp',
255 270 buffer = bufnr,
256 271 keys = '<leader>ld',
257 272 command = vim.lsp.buf.definition,
258 - })
273 + } )
260 - add(map.normal {
275 + add( map.normal {
261 276 description = 'Show implementations of symbol under cursor.',
262 277 category = 'lsp',
263 278 buffer = bufnr,
264 279 keys = '<leader>li',
265 280 command = vim.lsp.buf.implementation,
266 - })
281 + } )
268 - add(map.normal {
283 + add( map.normal {
269 284 description = 'Show incoming calls of symbol under cursor.',
270 285 category = 'lsp',
271 286 buffer = bufnr,
272 287 keys = '<leader>lci',
273 288 command = vim.lsp.buf.incoming_calls,
274 - })
289 + } )
276 - add(map.normal {
291 + add( map.normal {
277 292 description = 'Show outgoing calls of symbol under cursor.',
278 293 category = 'lsp',
279 294 buffer = bufnr,
280 295 keys = '<leader>lco',
281 296 command = vim.lsp.buf.outgoing_calls,
282 - })
297 + } )
284 - add(map.normal {
299 + add( map.normal {
285 300 description = 'Show references of symbol under cursor.',
286 301 category = 'lsp',
287 302 buffer = bufnr,
288 303 keys = '<leader>lr',
289 304 command = vim.lsp.buf.references,
290 - })
305 + } )
292 - add(map.normal {
307 + add( map.normal {
293 308 description = 'Rename symbol under cursor.',
294 309 category = 'lsp',
295 310 buffer = bufnr,
296 311 keys = { '<f2>', '<leader>ln' },
297 312 command = vim.lsp.buf.rename,
298 - })
313 + } )
301 316 local lsp_detach = function ( args )
317 332 vim.bo[bufnr].omnifunc = old_omnifunc
320 - for _, keybind_delete in ipairs(keybinds) do
335 + for _, keybind_delete in ipairs( keybinds ) do
321 336 keybind_delete()
326 340 auto 'lsp' {
349 363 local lsp_info = function ( command )
350 364 local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
351 - local active_clients = vim.lsp.get_active_clients( all_or_current )
365 + local active_clients = vim.lsp.get_clients( all_or_current )
353 367 local infos = vim.iter( active_clients )
354 368 :map( function ( client )
393 407 desc = 'Shows detailed information about running LSP clients.',
410 +--TODO: lsp restart, lsp exit
396 412 return setmetatable( _, {} )

neovim/lua/bugabinga/nugu/init.lua

Modified
228 228 sym '@label' { Label },
229 229 sym '@operator' { Operator },
230 230 sym '@keyword' { Keyword },
231 + sym '@keyword.return' { fg = Keyword.fg, bg = Keyword.bg, gui = 'underline bold' },
231 232 sym '@exception' { Exception },
232 233 sym '@variable' { Identifier },
233 234 sym '@type' { Type },

nushell/modules/aliases.nu

Modified
2 2 # Semantic aliases
3 3 export alias show = bat
4 4 export def list [] { ls --all --long --du --mime-type | where type == dir | append (ls --all --long --du --mime-type | where type != dir) }
5 5 export alias web = firefox
6 -export alias edit = hx
6 +export alias edit = nvim
7 7 # TODO ewrite bak command
8 8 export alias backup = bak

subversion/config

Modified
47 47 ### This will override the environment variables that Subversion
48 48 ### examines by default to find this information ($EDITOR,
49 49 ### et al).
50 -editor-cmd = hx
50 +editor-cmd = nvim
51 51 ### Set diff-cmd to the absolute path of your 'diff' program.
52 52 ### This will override the compile-time default, which is to use
53 53 ### Subversion's internal diff implementation.
54 -# TODO windows versions as bat files
55 -diff-cmd = /home/oli/.subversion/diff.bat
54 +diff-cmd = /home/oli/.subversion/diff
56 55 ### Diff-extensions are arguments passed to an external diff
57 56 ### program or to Subversion's internal diff implementation.
58 57 ### Set diff-extensions to override the default arguments ('-u').
60 59 ### Set diff3-cmd to the absolute path of your 'diff3' program.
61 60 ### This will override the compile-time default, which is to use
62 61 ### Subversion's internal diff3 implementation.
63 -# diff3-cmd = /home/oli/.subversion/diff3.bat
62 +diff3-cmd = /home/oli/.subversion/diff3
64 63 ### Set diff3-has-program-arg to 'yes' if your 'diff3' program
65 64 ### accepts the '--diff-program' option.
66 65 # diff3-has-program-arg = no
67 66 ### Set merge-tool-cmd to the command used to invoke your external
68 67 ### merging tool of choice. Subversion will pass 5 arguments to
69 68 ### the specified command: base theirs mine merged wcfile
70 -merge-tool-cmd = /home/oli/.subversion/merge.bat
69 +merge-tool-cmd = /home/oli/.subversion/merge
72 71 ### Section for configuring tunnel agents.
73 72 [tunnels]

subversion/config.win32

Modified
47 47 ### This will override the environment variables that Subversion
48 48 ### examines by default to find this information ($EDITOR,
49 49 ### et al).
50 -editor-cmd = hx
50 +editor-cmd = nvim
51 51 ### Set diff-cmd to the absolute path of your 'diff' program.
52 52 ### This will override the compile-time default, which is to use
53 53 ### Subversion's internal diff implementation.
54 -# TODO windows versions as bat files
55 54 diff-cmd = C:/Users/okr/AppData/Roaming/Subversion/diff.bat
56 55 ### Diff-extensions are arguments passed to an external diff
57 56 ### program or to Subversion's internal diff implementation.