From 63e0224714d3b99afde0f64e250a9e33ca0c36a8 Mon Sep 17 00:00:00 2001 From: notohh Date: Fri, 26 Jan 2024 11:38:09 -0500 Subject: [PATCH] neovim: config updates --- home/editors/neovim/config.lua | 43 +++++++++++++++++++++++----- home/editors/neovim/lua/presence.lua | 1 + 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/home/editors/neovim/config.lua b/home/editors/neovim/config.lua index 8f7b753..c4cb82c 100644 --- a/home/editors/neovim/config.lua +++ b/home/editors/neovim/config.lua @@ -4,31 +4,60 @@ vim.opt.relativenumber = true -- general lvim.log.level = "info" -lvim.format_on_save = { enabled = true, pattern = "*.lua", timeout = 1000 } --- to disable icons and use a minimalist setup, uncomment the following - +lvim.format_on_save.enabled = true +lvim.format_on_save.pattern = { "*.lua", "*.nix", "*.rs", "*.go" } -- keymappings lvim.leader = "space" + -- add your own keymapping lvim.keys.normal_mode[""] = ":w" -- -- Change theme settings -lvim.colorscheme = "lunar" +lvim.colorscheme = "tokyonight" lvim.transparent_window = true lvim.builtin.alpha.active = true lvim.builtin.alpha.mode = "dashboard" lvim.builtin.terminal.active = true lvim.builtin.nvimtree.setup.view.side = "left" -lvim.builtin.nvimtree.setup.renderer.icons.show.git = false - --- Automatically install missing parsers when entering buffer +lvim.builtin.nvimtree.setup.renderer.icons.show.git = true lvim.builtin.treesitter.auto_install = true + +-- plugins + lvim.plugins = { { "andweeb/presence.nvim", config = function() require("user.presence").config() end + }, + { + "folke/tokyonight.nvim", lazy = false, priority = 1000, opts = {} + }, + { + "windwp/nvim-spectre", + event = "BufRead", + config = function() require("spectre").setup() end + }, + { + "ggandor/leap.nvim", + name = "leap", + config = function() + require("leap").add_default_mappings() + end, + }, +} + +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { + name = "alejandra", + command = "alejandra", + args = { "--quiet" }, + filetypes = { "nix" } } } + +local function open_nvim_tree() require("nvim-tree.api").tree.open() end +vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) diff --git a/home/editors/neovim/lua/presence.lua b/home/editors/neovim/lua/presence.lua index f6ed8a8..d49d7b5 100644 --- a/home/editors/neovim/lua/presence.lua +++ b/home/editors/neovim/lua/presence.lua @@ -10,6 +10,7 @@ M.config = function() main_image = "file", client_id = "793271441293967371", buttons = true, + show_time = true, log_level = nil, debounce_timeout = 10, enable_line_number = true, -- Displays the current line number instead of the current project