From ad0d5db776042cd708b7117fe2bab5ad1b98dca5 Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Tue, 22 Nov 2022 10:05:16 -0500 Subject: [PATCH] tweaks to n and use clippy with rust --- lua/user/colorscheme.lua | 2 +- lua/user/keymaps.lua | 2 ++ lua/user/lsp/settings/rust_analyzer.lua | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lua/user/lsp/settings/rust_analyzer.lua diff --git a/lua/user/colorscheme.lua b/lua/user/colorscheme.lua index 4026739..7ecbe8c 100644 --- a/lua/user/colorscheme.lua +++ b/lua/user/colorscheme.lua @@ -15,7 +15,7 @@ require("catppuccin").setup({ return { TreesitterContext = { bg = colors.mantle }, TreesitterContextLineNumber = { bg = colors.mantle }, - TreesitterContextBottom = { style = { "underline" } }, + -- TreesitterContextBottom = { style = { "underline" } }, MultiCursor = { bg = colors.red }, VM_Cursor = { bg = colors.red }, } diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index 40ec4e1..4b9e7a1 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -130,9 +130,11 @@ local function clean_screen() if vim.o.number then vim.diagnostic.show() vim.opt.signcolumn = "yes" + vim.cmd("syntax on") else vim.diagnostic.hide() vim.opt.signcolumn = "no" + vim.cmd("syntax off") end end diff --git a/lua/user/lsp/settings/rust_analyzer.lua b/lua/user/lsp/settings/rust_analyzer.lua new file mode 100644 index 0000000..0776a8f --- /dev/null +++ b/lua/user/lsp/settings/rust_analyzer.lua @@ -0,0 +1,9 @@ +return { + settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy", + }, + }, + }, +}