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
| { | |
| _callbacks = { | |
| bytes = { <function 1> }, | |
| changedtree = { <function 2> }, | |
| child_added = {}, | |
| child_removed = {} | |
| }, | |
| _children = { | |
| lua = { | |
| _callbacks = { |
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
| ( | |
| (plain_value) @string | |
| (#eq? @string "background-color") | |
| ) @matched |
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
| vim.lsp.diagnostic.get_virtual_text_chunks_for_line = function(bufnr, line, line_diagnostics) | |
| if #line_diagnostics == 0 then | |
| return nil | |
| end | |
| local line_length = #(vim.api.nvim_buf_get_lines(bufnr, line, line + 1, false)[1] or '') | |
| local get_highlight = vim.lsp.diagnostic._get_severity_highlight_name | |
| -- Create a little more space between virtual text and contents | |
| local virt_texts = {{string.rep(" ", 80 - line_length)}} |
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
| function x() | |
| return 1, 2 | |
| end | |
| function y() | |
| local foo = {{x()}, {x()}} | |
| return vim.tbl_flatten(foo) | |
| 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
| let g:highlight_overlength = v:true | |
| let g:highlight_overlength_length = 72 | |
| let g:load_overlength = v:true | |
| " Use :call ToggleOverlength() | |
| " to toggle whether or not you show highlights | |
| function! ToggleOverlength() abort | |
| let g:highlight_overlength = !g:highlight_overlength | |
| if g:highlight_overlength |
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
| function! TestStuff() abort | |
| normal! gg | |
| let g:res = [] | |
| while search('^\S', 'W') | |
| call insert(g:res, { | |
| \ 'name': expand('<cword>'), | |
| \ 'line': line('.'), | |
| \ }, |
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
| " Test text | |
| " hello world | |
| " some text | |
| " here's more text | |
| " 1 | |
| " 2 | |
| " 3 | |
| "" |
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
| function! s:get_maps() abort | |
| return split(execute('map'), "\n") | |
| endfunction | |
| function! s:get_dict(mapping) abort | |
| let map_split = split(a:mapping, ' ') | |
| let l:mode = map_split[0] | |
| let l:map = map_split[2] | |
| return maparg(l:map, l:mode, v:false, v:true) | |
| endfunction |
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
| function! TestReturnHighlight() | |
| if &spell | |
| return '%#PreProc#%l%0' | |
| else | |
| return 'Not spelling and no colors' | |
| endif | |
| endfunction | |
| function! SetStatuslineSnippet() | |
| let l:str_stl = '' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.