golang and sql linters/formatters, angular css injections, text visual

line movement
This commit is contained in:
2023-07-12 00:13:38 -05:00
parent 8d7a4720b9
commit af6015fab2
3 changed files with 45 additions and 1 deletions
+5
View File
@@ -9,6 +9,11 @@ silent_map("n", "<Down>", "gj")
silent_map("n", "<Home>", "g<Home>") silent_map("n", "<Home>", "g<Home>")
silent_map("n", "<End>", "g<End>") silent_map("n", "<End>", "g<End>")
silent_map("v", "<Up>", "gk")
silent_map("v", "<Down>", "gj")
silent_map("v", "<Home>", "g<Home>")
silent_map("v", "<End>", "g<End>")
silent_map("i", "<Up>", "<C-o>gk") silent_map("i", "<Up>", "<C-o>gk")
silent_map("i", "<Down>", "<C-o>gj") silent_map("i", "<Down>", "<C-o>gj")
silent_map("i", "<Home>", "<C-o>g<Home>") silent_map("i", "<Home>", "<C-o>g<Home>")
+15 -1
View File
@@ -184,7 +184,7 @@ end
function M.nvim_treesitter() function M.nvim_treesitter()
local highlight_disable = { local highlight_disable = {
tsx = true, --tsx = true,
cpp = true, cpp = true,
} }
local rainbow_disable = vim.tbl_extend("force", highlight_disable, { local rainbow_disable = vim.tbl_extend("force", highlight_disable, {
@@ -408,6 +408,10 @@ function M.null_ls()
local null_ls = require("null-ls") local null_ls = require("null-ls")
local config = lsp_config_defaults() local config = lsp_config_defaults()
local sqlfluff_args = {
extra_args = { "--dialect", "postgres" },
}
-- ORDER IN TABLE DETERMINES EXECUTION ORDER -- ORDER IN TABLE DETERMINES EXECUTION ORDER
local sources = { local sources = {
-- python -- python
@@ -438,6 +442,16 @@ function M.null_ls()
-- cpp -- cpp
null_ls.builtins.formatting.clang_format, null_ls.builtins.formatting.clang_format,
-- golang
null_ls.builtins.diagnostics.golangci_lint,
null_ls.builtins.formatting.gofmt,
-- sql
-- null_ls.builtins.diagnostics.sqlfluff.with(sqlfluff_args),
-- null_ls.builtins.formatting.sqlfluff.with(sqlfluff_args),
-- null_ls.builtins.formatting.sqlfmt,
null_ls.builtins.formatting.sql_formatter,
} }
null_ls.setup({ null_ls.setup({
sources = sources, sources = sources,
+25
View File
@@ -8,3 +8,28 @@
(property_identifier) @_key (property_identifier) @_key
(template_string) @html))))) (template_string) @html)))))
(#eq? @_decorator "Component") (#eq? @_key "template")) (#eq? @_decorator "Component") (#eq? @_key "template"))
; angular inline styles
((decorator
(call_expression
(identifier) @_decorator
(arguments
(object
(pair
(property_identifier) @_key
(array
(string
(string_fragment) @css)))))))
(#eq? @_decorator "Component") (#eq? @_key "styles"))
; angular inline styles "template string"
((decorator
(call_expression
(identifier) @_decorator
(arguments
(object
(pair
(property_identifier) @_key
(array
(template_string) @css))))))
(#eq? @_decorator "Component") (#eq? @_key "styles"))