From 93581616c1e4ca18e641c903f08db3d01e8bdabc Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 8 Feb 2024 13:37:10 +0100 Subject: [PATCH 1/3] disable lsp for rustaceanvim --- lua/custom/plugins.lua | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index d9173a1..6b80b14 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -805,6 +805,24 @@ local plugins = { enabled = true, version = "^4", -- Recommended ft = { "rust" }, + config = function() + vim.g.rustaceanvim = { + -- Plugin configuration + tools = {}, + -- LSP configuration + server = { + on_attach = function(client, bufnr) + -- you can also put keymaps in here + end, + default_settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = {}, + }, + }, + -- DAP configuration + dap = {}, + } + end, }, { "theHamsta/nvim-dap-virtual-text", @@ -817,13 +835,7 @@ local plugins = { tools = {}, -- LSP configuration server = { - on_attach = function(client, bufnr) - -- you can also put keymaps in here - end, - settings = { - -- rust-analyzer language server configuration - ["rust-analyzer"] = {}, - }, + auto_attach = false, }, -- DAP configuration dap = { From c05a9c9c4d25f5d4cbaf0346d2f8436b7379fd4f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 8 Feb 2024 13:38:13 +0100 Subject: [PATCH 2/3] fix auto merge --- lua/custom/plugins.lua | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index d69b9cd..cb96d77 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -805,29 +805,6 @@ local plugins = { version = "^4", -- Recommended ft = { "rust" }, config = function() - vim.g.rustaceanvim = { - -- Plugin configuration - tools = {}, - -- LSP configuration - server = { - on_attach = function(client, bufnr) - -- you can also put keymaps in here - end, - default_settings = { - -- rust-analyzer language server configuration - ["rust-analyzer"] = {}, - }, - }, - -- DAP configuration - dap = {}, - } - end, - }, - { - "theHamsta/nvim-dap-virtual-text", - lazy = false, -- PERF: this can be done more elegant - config = function() - require("nvim-dap-virtual-text").setup() local dap = require "dap" vim.g.rustaceanvim = { -- Plugin configuration @@ -846,6 +823,13 @@ local plugins = { } end, }, + { + "theHamsta/nvim-dap-virtual-text", + lazy = false, -- PERF: this can be done more elegant + config = function() + require("nvim-dap-virtual-text").setup() + end, + }, } return plugins From c303f4a474aa2675d0cec90b6f1ff06b0a138a87 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 9 Feb 2024 15:29:17 +0100 Subject: [PATCH 3/3] djlint and formatting improvements --- lua/custom/mappings.lua | 2 +- lua/custom/plugins.lua | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 42a15d1..0dcfdc2 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -410,7 +410,7 @@ M.edit = { -- format with conform ["ff"] = { function() - require("conform").format() + vim.lsp.buf.format() end, "format buffer", }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index cb96d77..fbb1d0e 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -580,15 +580,12 @@ local plugins = { local nls = require "null-ls" local builtins = nls.builtins local sources = { - builtins.formatting.black, - builtins.formatting.fixjson, - builtins.formatting.golines, - builtins.formatting.shellharden, - builtins.formatting.sql_formatter, - builtins.diagnostics.mypy, - builtins.diagnostics.vint, - builtins.diagnostics.yamllint, - builtins.code_actions.shellcheck, + builtins.formatting.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, + builtins.diagnostics.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, builtins.formatting.shfmt, builtins.diagnostics.write_good.with { diagnostics_postprocess = function(diagnostic)