|
66 | 66 | colorschemes.kanagawa.enable = true; |
67 | 67 | diagnostic.settings.virtual_text = true; |
68 | 68 | editorconfig.enable = true; |
| 69 | + |
| 70 | + files = { |
| 71 | + "ftdetect/bash.vim" = /* vim */ '' |
| 72 | + au BufRead,BufNewFile .envrc set filetype=bash |
| 73 | + ''; |
| 74 | + "ftdetect/bindzone.vim" = /* vim */ '' |
| 75 | + au BufRead,BufNewFile *.zone set filetype=bindzone |
| 76 | + ''; |
| 77 | + "ftdetect/conf.vim" = /* vim */ '' |
| 78 | + " only overwrite the filetype if it is plain conf |
| 79 | + if (&filetype ==# 'conf') |
| 80 | + au BufNewFile,BufRead *.conf set filetype=dosini |
| 81 | + endif |
| 82 | + au BufNewFile,BufRead {,*/.config}/nix/nix.conf set filetype=conf |
| 83 | + ''; |
| 84 | + "ftdetect/jsonc.vim" = /* vim */ '' |
| 85 | + " Source https://github.com/kevinoid/vim-jsonc/blob/master/ftdetect/jsonc.vim |
| 86 | + " Licensed under MIT |
| 87 | +
|
| 88 | + " https://github.com/mohae/cjson |
| 89 | + autocmd BufNewFile,BufRead *.cjsn setfiletype jsonc |
| 90 | + " https://github.com/mohae/cjson |
| 91 | + autocmd BufNewFile,BufRead *.cjson setfiletype jsonc |
| 92 | + " https://github.com/Microsoft/vscode/issues/48969 |
| 93 | + " https://komkom.github.io/ |
| 94 | + " https://github.com/mochajs/mocha/issues/3753 |
| 95 | + autocmd BufNewFile,BufRead *.jsonc setfiletype jsonc |
| 96 | +
|
| 97 | + " Recognize some files known to support JSON with comments |
| 98 | + " Entries sorted by pattern |
| 99 | +
|
| 100 | + " https://eslint.org/docs/user-guide/configuring |
| 101 | + autocmd BufNewFile,BufRead .eslintrc.json setlocal filetype=jsonc |
| 102 | + " https://jshint.com/docs/ |
| 103 | + autocmd BufNewFile,BufRead .jshintrc setlocal filetype=jsonc |
| 104 | + " https://mochajs.org/#configuring-mocha-nodejs |
| 105 | + autocmd BufNewFile,BufRead .mocharc.json setlocal filetype=jsonc |
| 106 | + autocmd BufNewFile,BufRead .mocharc.jsonc setlocal filetype=jsonc |
| 107 | + " https://github.com/neoclide/coc.nvim |
| 108 | + autocmd BufNewFile,BufRead coc-settings.json setlocal filetype=jsonc |
| 109 | + " https://github.com/clutchski/coffeelint/pull/407 |
| 110 | + autocmd BufNewFile,BufRead coffeelint.json setlocal filetype=jsonc |
| 111 | + " https://github.com/microsoft/TypeScript/pull/5450 |
| 112 | + autocmd BufNewFile,BufRead tsconfig.json setlocal filetype=jsonc |
| 113 | + " https://github.com/Alexays/Waybar/wiki/Configuration |
| 114 | + autocmd BufNewFile,BufRead */waybar/config setlocal filetype=jsonc |
| 115 | + ''; |
| 116 | + }; |
| 117 | + |
69 | 118 | globals.mapleader = " "; |
70 | 119 | luaLoader.enable = true; |
71 | 120 |
|
|
0 commit comments