diff --git a/home/helix/default.nix b/home/editors/helix/default.nix similarity index 100% rename from home/helix/default.nix rename to home/editors/helix/default.nix diff --git a/home/helix/languages.nix b/home/editors/helix/languages.nix similarity index 82% rename from home/helix/languages.nix rename to home/editors/helix/languages.nix index ad9c1c3..4c4d6d5 100644 --- a/home/helix/languages.nix +++ b/home/editors/helix/languages.nix @@ -20,6 +20,13 @@ command = lib.getExe rustfmt; }; } + { + name = "lua"; + auto-format = true; + formatter = { + command = lib.getExe luaformatter; + }; + } ]; language-server = with pkgs; { nil = { diff --git a/home/helix/themes/catppuccin_mocha.nix b/home/editors/helix/themes/catppuccin_mocha.nix similarity index 100% rename from home/helix/themes/catppuccin_mocha.nix rename to home/editors/helix/themes/catppuccin_mocha.nix diff --git a/home/helix/themes/tokyonight.nix b/home/editors/helix/themes/tokyonight.nix similarity index 100% rename from home/helix/themes/tokyonight.nix rename to home/editors/helix/themes/tokyonight.nix diff --git a/home/editors/neovim/config.lua b/home/editors/neovim/config.lua new file mode 100644 index 0000000..8f7b753 --- /dev/null +++ b/home/editors/neovim/config.lua @@ -0,0 +1,34 @@ +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +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 + + +-- keymappings +lvim.leader = "space" +-- add your own keymapping +lvim.keys.normal_mode[""] = ":w" + +-- -- Change theme settings +lvim.colorscheme = "lunar" +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.treesitter.auto_install = true + +lvim.plugins = { + { + "andweeb/presence.nvim", + config = function() require("user.presence").config() end + } +} diff --git a/home/editors/neovim/default.nix b/home/editors/neovim/default.nix new file mode 100644 index 0000000..56c389a --- /dev/null +++ b/home/editors/neovim/default.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + home.packages = [pkgs.lunarvim]; + xdg.configFile."lvim/config.lua".source = ./config.lua; + xdg.configFile."lvim/lua/user/presence.lua".source = ./lua/presence.lua; +} diff --git a/home/editors/neovim/lua/presence.lua b/home/editors/neovim/lua/presence.lua new file mode 100644 index 0000000..f6ed8a8 --- /dev/null +++ b/home/editors/neovim/lua/presence.lua @@ -0,0 +1,26 @@ +local M = {} + +M.config = function() + local status_ok, presence = pcall(require, "presence") + if not status_ok then return end + + presence:setup { + auto_update = true, + neovim_image_text = "LunarVim", + main_image = "file", + client_id = "793271441293967371", + buttons = true, + log_level = nil, + debounce_timeout = 10, + enable_line_number = true, -- Displays the current line number instead of the current project + editing_text = "Editing %s", -- string rendered when an editable file is loaded in the buffer + file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer + git_commit_text = "Committing changes", -- string rendered when commiting changes in git + plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins + reading_text = "Reading %s", -- string rendered when a read-only file is loaded in the buffer + workspace_text = "Working on %s", -- Workspace format string (either string or function(git_project_name: string|nil, buffer: string): string) + line_number_text = "Line %s out of %s" -- Line number string (for when enable_line_number is set to true) + } +end + +return M