repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: treesitter conceal for lua

b4acfdd43fced0ce7282ea1c3fc9c795d2ef4ad8

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (8)

neovim/README.md

Modified
39 39 # todo
41 41 * which-key and lazy loaded keys are not clean yet
42 +* telescope find filter binary files (spell files)
43 +* navic highlights do not fit winbar
42 44 * write plugin to parse lsp settings,plugin options and neovim settings locally and apply them ( can we repurpose editorconfig support in neovim for that?)
43 45 * does status bar fail to display if lsp fails to load?
44 46 * pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc

neovim/after/queries/lua/highlights.scm

Modified
1 -(("local" @keyword) (#set! conceal "⋅"))
2 -(("function" @keyword.function) (#set! conceal "ϝ"))
3 -(("end" @keyword.function) (#set! conceal "∎"))
4 -(("return" @keyword.return) (#set! conceal "↳"))
5 -(("then" @conditional) (#set! conceal "⟶"))
7 -((dot_index_expression table: (identifier) @variable (#eq? @variable "vim")) (#set! conceal ""))
9 -((function_call name: (identifier) @function (#eq? @function "require")) (#set! conceal ""))
11 -; ((function_call name: (identifier) @function (#eq? @function "want")) (#set! conceal "ω"))
12 -; ((local_declaration name: (identifier) @variable (#eq? @variable "want") (#set! conceal "ω"))
1 +;; inherits: lua
2 +;; extends
3 +(("local" @keyword) (#set! conceal "·"))
4 +(("function" @keyword.function) (#set! conceal "λ"))
5 +(("return" @keyword.return) (#set! conceal "󰌑"))

neovim/ftplugin/lua.lua

Modified
5 5 vim.opt_local.path:append( path .. '/lua' )
6 6 end
7 7 vim.opt_local.suffixesadd:prepend '.lua'
8 +vim.opt_local.conceallevel = 1

neovim/lazy-lock.json

Modified
7 7 "dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
8 8 "fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
9 9 "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
10 - "gen.nvim": { "branch": "main", "commit": "2cb643b1a827bcdfc665a37d5f8174249d2d5bf5" },
10 + "gen.nvim": { "branch": "main", "commit": "87fbe811155b90eea58622614809705b966009ad" },
11 11 "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
12 12 "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
13 13 "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" },
14 - "hlargs.nvim": { "branch": "main", "commit": "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" },
15 14 "hyper.nvim": { "branch": "main", "commit": "b84fb39e703b1dd487d20c4faf028ee51374c88b" },
16 15 "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
17 - "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
16 + "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
18 17 "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" },
19 18 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
20 19 "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" },
21 20 "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" },
22 21 "mini.starter": { "branch": "main", "commit": "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" },
23 22 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
24 - "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" },
25 - "neogen": { "branch": "main", "commit": "b95347a588401a755eadd17482edc1662876bd58" },
23 + "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
24 + "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
26 25 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
27 26 "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
28 - "nvim-autopairs": { "branch": "master", "commit": "797260ff31e8bdd9db0f0c352659a35aba335b0b" },
27 + "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
29 28 "nvim-genghis": { "branch": "main", "commit": "8613fc1b43db6cc761733b3630eabff9e86296f7" },
30 29 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
31 30 "nvim-jdtls": { "branch": "master", "commit": "a4746791876166dc146eae573a1b49d24a6652e7" },
32 31 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
33 32 "nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" },
34 - "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" },
33 + "nvim-navbuddy": { "branch": "master", "commit": "f34237e8a41ebc6e2716af2ebf49854d8c5289c8" },
35 34 "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
36 35 "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
37 - "nvim-spectre": { "branch": "master", "commit": "e7db8ebca7fd0a604027ebf85acee52f6642c91c" },
36 + "nvim-spectre": { "branch": "master", "commit": "1d23be1165c373a6026e42f3b3a5100126eaf81d" },
38 37 "nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" },
39 - "nvim-tree.lua": { "branch": "master", "commit": "707b24af91a1d05823099ed8c5450796290466ba" },
40 - "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
41 - "nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
38 + "nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" },
39 + "nvim-treesitter": { "branch": "master", "commit": "11a3584b81c3249d2b6279305aee1c7ad273985a" },
40 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "2aa454e4037424c678a8ff033951a5be39e54b9c" },
42 41 "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
43 - "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
44 - "nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" },
45 - "nvim-window": { "branch": "main", "commit": "e7f5d60eeec8ff37af7be4c9a99f65edf67fc574" },
42 + "nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" },
43 + "nvim-web-devicons": { "branch": "master", "commit": "20921d33c605ba24c8d0b76b379a54a9c83ba170" },
44 + "nvim-window": { "branch": "main", "commit": "fad0dc96de265b0bdcb21d1071329e5ab1deb4af" },
46 45 "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" },
47 46 "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
48 47 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
49 - "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
50 - "schemastore.nvim": { "branch": "main", "commit": "4d798fd5b692c8fce77268aba8f6f926b0c9f835" },
48 + "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
49 + "schemastore.nvim": { "branch": "main", "commit": "80d701841487f72bf9d3fa56b25146b95e190502" },
51 50 "specs.nvim": { "branch": "main", "commit": "e929006d3f6bb8e43f03e13ac364c67236eb5299" },
52 51 "speedtyper.nvim": { "branch": "main", "commit": "2d158eed4c753995b0501a3a7a72464fbb213e3d" },
53 52 "ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
1 -local map = require 'std.map'
3 1 require 'bugabinga.health'.add_dependency
4 -{
5 - name = 'CMake',
6 - name_of_executable = 'cmake',
7 -}
8 - {
9 - name_of_executable = 'make',
10 - }
11 - {
12 - name_of_executable = 'zig',
13 - }
14 - {
15 - name = 'TreeSitter CLI',
16 - name_of_executable = 'tree-sitter',
17 - }
18 - {
19 - name_of_executable = 'tar',
20 - }
2 +{ name = 'CMake', name_of_executable = 'cmake', }
3 + { name_of_executable = 'make', }
4 + { name_of_executable = 'zig', }
5 + { name = 'TreeSitter CLI', name_of_executable = 'tree-sitter', }
6 + { name_of_executable = 'tar', }
22 8 return {
23 9 'nvim-treesitter/nvim-treesitter',
24 - tag = 'v0.9.2',
25 - -- branch = 'master',
26 - event = { 'BufReadPre', 'BufNewFile', },
10 + branch = 'master',
11 + -- to get access to newer parsers, TS cannot yet be pinned
12 + -- version = '0.9.*',
13 + event = 'VeryLazy',
14 + -- event = { 'BufReadPre', 'BufNewFile', },
27 15 build = function ()
28 16 require 'nvim-treesitter.install'.update { with_sync = true, }
49 37 ensure_installed = {
50 38 'bash',
52 - -- https://github.com/nvim-treesitter/nvim-treesitter/issues/5389
53 40 'comment',
54 41 'diff',
55 42 'dot',
43 + 'dtd',
56 44 'git_config',
45 + 'gitattributes',
57 46 'gitcommit',
58 47 'gitignore',
48 + 'ini',
59 49 'java',
60 50 'jsonc',
61 - 'markdown',
62 - 'markdown_inline',
63 - 'nu',
64 51 'lua',
65 52 'luap',
66 53 'luadoc',
54 + 'markdown',
55 + 'markdown_inline',
56 + 'muttrc',
57 + 'nasm',
58 + 'nix',
59 + 'nu',
60 + 'passwd',
61 + 'pem',
62 + 'properties',
63 + 'proto',
64 + 'printf',
65 + 'query',
67 66 'regex',
67 + 'ssh_config',
68 + 'toml',
69 + 'udev',
68 70 'vim',
69 71 'vimdoc',
70 - 'query',
72 + 'xml',
71 73 'zig',
76 78 auto_install = true,
78 - autotag = { enable = true, },
80 + autotag = { enable = false, },
80 82 highlight = {
81 83 enable = true,

neovim/lua/std/project.lua

Modified
1 1 local debug = require 'std.debug'
2 2 local table = require 'std.table'
3 4 local join = table.join
4 5 local dirname = vim.fs.dirname
5 6 local normalize = vim.fs.normalize
14 15 local create_hash = function ( path, markers )
15 16 local path_hash = hasher( path )
16 17 local markers_hash = hasher( markers_to_string( markers ) )
17 - local hash = path_hash .. '|' .. markers_hash
18 - return hash
18 + return path_hash .. '|' .. markers_hash
20 20 local cache_get = function ( path, markers )
21 21 local hash = create_hash( path, markers )

neovim/spell/nerd.utf-8.add

Modified
25 25 autopairs
26 26 cterm/!
27 +navic
28 +winbar

neovim/spell/nerd.utf-8.add.spl

Modified

Previous version contains binary or non-UTF-8 data.

Current version contains binary or non-UTF-8 data.