replaced things with ruff, old htmldjango highlighting

This commit is contained in:
2023-02-03 20:19:40 -06:00
parent 0a559cb7aa
commit 167589deb1
3 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ opt.mouse = ""
vim.cmd([[hi CursorLine cterm=NONE ctermbg=darkgray ctermfg=white]]) vim.cmd([[hi CursorLine cterm=NONE ctermbg=darkgray ctermfg=white]])
vim.cmd([[au BufRead,BufNewFile .env.* set filetype=sh]]) vim.cmd([[au BufRead,BufNewFile .env.* set filetype=sh]])
vim.cmd([[au BufRead,BufNewFile Dockerfile.* set filetype=dockerfile]]) vim.cmd([[au BufRead,BufNewFile Dockerfile.* set filetype=dockerfile]])
vim.cmd([[au BufRead,BufNewFile *.html set filetype=html]]) --vim.cmd([[au BufRead,BufNewFile *.html set filetype=html]])
-- redo folds on write -- redo folds on write
vim.cmd([[au BufWrite * normal zx]]) vim.cmd([[au BufWrite * normal zx]])
+8 -5
View File
@@ -213,7 +213,7 @@ function M.nvim_treesitter()
disable = function(lang, bufnr) disable = function(lang, bufnr)
return highlight_disable[lang] or too_many_lines(bufnr) return highlight_disable[lang] or too_many_lines(bufnr)
end, end,
additional_vim_regex_highlighting = { "htmldjango", "html" }, additional_vim_regex_highlighting = { "htmldjango" },
}, },
rainbow = { rainbow = {
enable = true, enable = true,
@@ -236,14 +236,14 @@ function M.nvim_treesitter()
local htmldjango_path = "/home/guy/code/treesitter/tree-sitter-htmldjango-myown" local htmldjango_path = "/home/guy/code/treesitter/tree-sitter-htmldjango-myown"
if vim.fn.filereadable(htmldjango_path) then if vim.fn.filereadable(htmldjango_path .. "/src/parser.c") then
local parser_config = require("nvim-treesitter.parsers").get_parser_configs() local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.htmldjango = { parser_config.htmldjango = {
install_info = { install_info = {
url = htmldjango_path, -- local path or git repo url = htmldjango_path, -- local path or git repo
files = { "src/parser.c" }, files = { "src/parser.c" },
-- optional entries: -- optional entries:
branch = "paired-tags", -- default branch in case of git repo if different from master --branch = "paired-tags", -- default branch in case of git repo if different from master
--generate_requires_npm = false, -- if stand-alone parser without npm dependencies --generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
}, },
@@ -378,11 +378,14 @@ function M.null_ls()
-- ORDER IN TABLE DETERMINES EXECUTION ORDER -- ORDER IN TABLE DETERMINES EXECUTION ORDER
local sources = { local sources = {
-- python -- python
null_ls.builtins.diagnostics.flake8, --null_ls.builtins.diagnostics.flake8,
null_ls.builtins.diagnostics.mypy, null_ls.builtins.diagnostics.mypy,
null_ls.builtins.diagnostics.ruff,
null_ls.builtins.formatting.black, null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort, null_ls.builtins.formatting.ruff,
--null_ls.builtins.formatting.isort,
--null_ls.builtins.diagnostics.djlint, --null_ls.builtins.diagnostics.djlint,
-- js -- js
null_ls.builtins.diagnostics.eslint, null_ls.builtins.diagnostics.eslint,
null_ls.builtins.code_actions.eslint, null_ls.builtins.code_actions.eslint,
-4
View File
@@ -39,8 +39,4 @@
"and" "and"
"is" "is"
"as" "as"
"endfor"
"endif"
"else"
"empty"
] @keyword ] @keyword