From 167589deb15b50926d84abc83f547da180525898 Mon Sep 17 00:00:00 2001 From: long Date: Fri, 3 Feb 2023 20:19:40 -0600 Subject: [PATCH] replaced things with ruff, old htmldjango highlighting --- lua/base.lua | 2 +- lua/plugins/config.lua | 13 ++++++++----- queries/htmldjango/highlights.scm | 4 ---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lua/base.lua b/lua/base.lua index d1797e0..58ee37c 100644 --- a/lua/base.lua +++ b/lua/base.lua @@ -126,7 +126,7 @@ opt.mouse = "" vim.cmd([[hi CursorLine cterm=NONE ctermbg=darkgray ctermfg=white]]) vim.cmd([[au BufRead,BufNewFile .env.* set filetype=sh]]) 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 vim.cmd([[au BufWrite * normal zx]]) diff --git a/lua/plugins/config.lua b/lua/plugins/config.lua index a4305e6..a0da574 100644 --- a/lua/plugins/config.lua +++ b/lua/plugins/config.lua @@ -213,7 +213,7 @@ function M.nvim_treesitter() disable = function(lang, bufnr) return highlight_disable[lang] or too_many_lines(bufnr) end, - additional_vim_regex_highlighting = { "htmldjango", "html" }, + additional_vim_regex_highlighting = { "htmldjango" }, }, rainbow = { enable = true, @@ -236,14 +236,14 @@ function M.nvim_treesitter() 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() parser_config.htmldjango = { install_info = { url = htmldjango_path, -- local path or git repo files = { "src/parser.c" }, -- 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 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 local sources = { -- python - null_ls.builtins.diagnostics.flake8, + --null_ls.builtins.diagnostics.flake8, null_ls.builtins.diagnostics.mypy, + null_ls.builtins.diagnostics.ruff, 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, + -- js null_ls.builtins.diagnostics.eslint, null_ls.builtins.code_actions.eslint, diff --git a/queries/htmldjango/highlights.scm b/queries/htmldjango/highlights.scm index 64185d2..17718b1 100644 --- a/queries/htmldjango/highlights.scm +++ b/queries/htmldjango/highlights.scm @@ -39,8 +39,4 @@ "and" "is" "as" - "endfor" - "endif" - "else" - "empty" ] @keyword