From 55b8aab06ab44da04b4deb5af7fe9e12375f2f34 Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Thu, 20 Feb 2025 02:59:34 -0600 Subject: [PATCH] separator --- vim/.vim/lua/plugins/bufferline.lua | 56 ++++++++++++++--------------- vim/.vim/lua/plugins/rust.lua | 45 +++++++++++++++++++++-- 2 files changed, 70 insertions(+), 31 deletions(-) diff --git a/vim/.vim/lua/plugins/bufferline.lua b/vim/.vim/lua/plugins/bufferline.lua index 83403c8..9c2f388 100644 --- a/vim/.vim/lua/plugins/bufferline.lua +++ b/vim/.vim/lua/plugins/bufferline.lua @@ -1,30 +1,30 @@ return { - { - "akinsho/bufferline.nvim", - version = "*", - dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = { - options = { - separator_style = "slope", - offsets = { { - filetype = "neo-tree", - text = "NeoTree", - highlight = "Directory", - separator = true, -- use a "true" to enable the default, or set your own character - }, }, - mode = "tabs", - diagnostics = "nvim_lsp", - -- diagnostics_indicator = function(count, level, diagnostics_dict, context) - -- local symbols = { error = " ", warning = " ", info = " ", hint = "󱠂 " } - -- local icon = symbols[level] or level - -- return "" .. icon .. count - -- end, - max_name_length = 30, - tab_size = 27, - truncate_name = false, - show_close_icon = false, - show_buffer_close_icons = false, - }, - }, - }, + { + "akinsho/bufferline.nvim", + version = "*", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + options = { + separator_style = "slope", + -- offsets = { { + -- filetype = "neo-tree", + -- text = "NeoTree", + -- highlight = "Directory", + -- separator = true, -- use a "true" to enable the default, or set your own character + -- }, }, + mode = "tabs", + diagnostics = "nvim_lsp", + -- diagnostics_indicator = function(count, level, diagnostics_dict, context) + -- local symbols = { error = " ", warning = " ", info = " ", hint = "󱠂 " } + -- local icon = symbols[level] or level + -- return "" .. icon .. count + -- end, + max_name_length = 30, + tab_size = 27, + truncate_name = false, + show_close_icon = false, + show_buffer_close_icons = false, + }, + }, + }, } diff --git a/vim/.vim/lua/plugins/rust.lua b/vim/.vim/lua/plugins/rust.lua index 8d69383..973df10 100644 --- a/vim/.vim/lua/plugins/rust.lua +++ b/vim/.vim/lua/plugins/rust.lua @@ -2,9 +2,48 @@ return { { "ron-rs/ron.vim" }, { "mrcjkb/rustaceanvim", - version = "^5", -- Recommended - lazy = false, -- This plugin is already lazy - keys = {}, + version = vim.fn.has("nvim-0.10.0") == 0 and "^4" or false, + ft = { "rust" }, + config = function(_, opts) + vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) + end, + opts = { + server = { + default_settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = { + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true, + ignored = { + ["async-trait"] = { "async_trait" }, + ["napi-derive"] = { "napi" }, + ["async-recursion"] = { "async_recursion" }, + }, + }, + files = { + excludeDirs = { + ".direnv", + ".git", + ".github", + ".gitlab", + "bin", + "node_modules", + "target", + "venv", + ".venv", + }, + }, + }, + }, + }, + }, }, { "saecki/crates.nvim",