From 23e0f619463cb6ff4ce82239bc3b888d7fccf319 Mon Sep 17 00:00:00 2001 From: Benjamin Chaussé Date: Thu, 16 May 2024 02:02:41 -0400 Subject: Major cleanup for macOS development --- .gitignore | 50 +++++++++++++++++++++++++++++++----- lua/ben/plugins/fugitive.lua | 28 ++++++++++----------- lua/ben/plugins/gitignore.lua | 17 +++---------- lua/ben/plugins/linting.lua | 2 +- lua/ben/plugins/lsp/mason.lua | 35 +------------------------- lua/ben/plugins/lualine.lua | 6 +++-- lua/ben/plugins/neorg.lua | 57 +++++++++++++++++++----------------------- lua/ben/plugins/smoothie.lua | 4 --- lua/ben/plugins/treesitter.lua | 5 ---- lua/ben/plugins/yadm.lua | 22 ++++++++-------- 10 files changed, 104 insertions(+), 122 deletions(-) delete mode 100644 lua/ben/plugins/smoothie.lua diff --git a/.gitignore b/.gitignore index 3b8f40f..31c8c98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -# Created by https://www.toptal.com/developers/gitignore/api/lua -# Edit at https://www.toptal.com/developers/gitignore?templates=lua - -### Lua ### # Compiled Lua sources luac.out @@ -43,7 +39,6 @@ luac.out *.x86_64 *.hex -### Vim ### # Swap [._]*.s[a-v][a-z] !*.svg # comment out if you don't need vector files @@ -64,12 +59,53 @@ tags # Persistent undo [._]*.un~ -### Tags ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + # Ignore tags created by etags, ctags, gtags (GNU global) and cscope TAGS .TAGS !TAGS/ tags +ctags .tags !tags/ gtags.files @@ -82,3 +118,5 @@ cscope.out cscope.in.out cscope.po.out + + diff --git a/lua/ben/plugins/fugitive.lua b/lua/ben/plugins/fugitive.lua index 4b73c42..051a983 100644 --- a/lua/ben/plugins/fugitive.lua +++ b/lua/ben/plugins/fugitive.lua @@ -17,20 +17,20 @@ return { }, config = function() -- Use > and < to fix merge conflicts (keep the cursor in the middle of the screen) - vim.api.nvim_set_keymap("n", ">", "diffg //2diffupdate", { noremap = true, silent = true }) - vim.api.nvim_set_keymap("n", "<", "diffg //3diffupdate", { noremap = true, silent = true }) + -- vim.api.nvim_set_keymap("n", ">", "diffg //2diffupdate", { noremap = true, silent = true }) + -- vim.api.nvim_set_keymap("n", "<", "diffg //3diffupdate", { noremap = true, silent = true }) -- Use } and { to force the entire file - vim.api.nvim_set_keymap( - "n", - "}", - "hGwrite!diffupdate", - { noremap = true, silent = true } - ) - vim.api.nvim_set_keymap( - "n", - "{", - "lGwrite!diffupdate", - { noremap = true, silent = true } - ) + -- vim.api.nvim_set_keymap( + -- "n", + -- "}", + -- "hGwrite!diffupdate", + -- { noremap = true, silent = true } + -- ) + -- vim.api.nvim_set_keymap( + -- "n", + -- "{", + -- "lGwrite!diffupdate", + -- { noremap = true, silent = true } + -- ) end, } diff --git a/lua/ben/plugins/gitignore.lua b/lua/ben/plugins/gitignore.lua index 0a657d9..08188a3 100644 --- a/lua/ben/plugins/gitignore.lua +++ b/lua/ben/plugins/gitignore.lua @@ -1,18 +1,7 @@ return { - "theniceboy/fzf-gitignore", + "antonk52/gitignore-grabber.nvim", dependencies = { - { - "junegunn/fzf", - build = function() - vim.fn["fzf#install"]() - end, - }, + { "nvim-telescope/telescope.nvim" }, }, - cond = function() - return vim.fn.executable("python3") == 1 - end, - build = function() - vim.cmd([[UpdateRemotePlugins]]) - end, - ft = "gitignore", + cmd = "Gitignore", } diff --git a/lua/ben/plugins/linting.lua b/lua/ben/plugins/linting.lua index a5be347..3f28b53 100644 --- a/lua/ben/plugins/linting.lua +++ b/lua/ben/plugins/linting.lua @@ -7,7 +7,7 @@ return { css = { "stylelint" }, markdown = { "markdownlint" }, python = { "pylint" }, - go = { "golangci_lint" }, + -- go = { "golangci_lint" }, sh = { "shellcheck" }, } diff --git a/lua/ben/plugins/lsp/mason.lua b/lua/ben/plugins/lsp/mason.lua index 121509d..e352a6e 100644 --- a/lua/ben/plugins/lsp/mason.lua +++ b/lua/ben/plugins/lsp/mason.lua @@ -24,49 +24,16 @@ return { }) mason_lspconfig.setup({ -- list of servers for mason to install - ensure_installed = { - "bashls", - "cssls", - "diagnosticls", - "dockerls", - "docker_compose_language_service", - "gopls", - "lua_ls", - "texlab", - "zk", - "pyright", - "r_language_server", - "sqls", - }, + ensure_installed = {}, -- auto-install configured servers (with lspconfig) automatic_installation = true, -- not the same as ensure_installed }) mason_tool_installer.setup({ ensure_installed = { - "mutt-language-server", - "emmet-ls", - -- Linters: - "prettier", - "bibtex-tidy", - "goimports", - "gci", - "golines", - "shfmt", - "latexindent", - "sql-formatter", - "isort", - "black", - "yamlfix", - "stylua", - -- Formatters: - "stylelint", - "markdownlint", - "pylint", "golangci-lint", "shellcheck", }, }) - end, } diff --git a/lua/ben/plugins/lualine.lua b/lua/ben/plugins/lualine.lua index 0cecbf4..ebd4734 100644 --- a/lua/ben/plugins/lualine.lua +++ b/lua/ben/plugins/lualine.lua @@ -11,8 +11,10 @@ return { -- component_separators = { left = "", right = "" }, -- component_separators = { left = "", right = "" }, -- section_separators = { left = "", right = "" }, - section_separators = { left = "▓", right = "▓" }, - component_separators = { left = "░", right = "░" }, + -- section_separators = { left = "▓", right = "▓" }, + -- component_separators = { left = "░", right = "░" }, + section_separators = { left = "", right = "" }, + component_separators = { left = "", right = "" }, globalstatus = false, ignore_focus = {}, always_divide_middle = true, diff --git a/lua/ben/plugins/neorg.lua b/lua/ben/plugins/neorg.lua index ece2a53..7a18c00 100644 --- a/lua/ben/plugins/neorg.lua +++ b/lua/ben/plugins/neorg.lua @@ -1,39 +1,34 @@ return { - "nvim-neorg/neorg", - build = ":Neorg sync-parsers", + 'nvim-orgmode/orgmode', dependencies = { - "nvim-lua/plenary.nvim", - "nvim-neorg/neorg-telescope", + { -- Nicely formatted bullet Headings + "akinsho/org-bullets.nvim", + dependencies = "nvim-treesitter/nvim-treesitter", + config = true, + }, }, + event = 'VeryLazy', + ft = { 'org' }, config = function() - require("neorg").setup({ - load = { - ["core.defaults"] = {}, -- Loads default behaviour - ["core.export"] = {}, -- Loads default behaviour - ["core.concealer"] = { - config = { - icons = { - heading = { - icons = { - "", - "", - "", - "", - }, - }, - }, - }, - }, -- Adds pretty icons to your documents - ["core.integrations.telescope"] = {}, - ["core.dirman"] = { -- Manages Neorg workspaces - config = { - workspaces = { - notes = "~/Dropbox/org", - }, - default_workspace = "notes", - }, - }, + -- This is bound to org-modern: + -- local Menu = require("org-modern.menu") + -- Setup orgmode + require('orgmode').setup({ + org_agenda_files = '~/Dropbox/org/**/*', + org_default_notes_file = '~/Dropbox/org/index.org', + emacs_config = { + executable_path = '/opt/homebrew/bin/emacs', + config_path = '$HOME/.config/emacs/early-init.el', }, }) + vim.opt.conceallevel = 2 + vim.opt.concealcursor = 'v' + + -- NOTE: If you are using nvim-treesitter with `ensure_installed = "all"` option + -- add `org` to ignore_install + -- require('nvim-treesitter.configs').setup({ + -- ensure_installed = 'all', + -- ignore_install = { 'org' }, + -- }) end, } diff --git a/lua/ben/plugins/smoothie.lua b/lua/ben/plugins/smoothie.lua deleted file mode 100644 index 3afb796..0000000 --- a/lua/ben/plugins/smoothie.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "psliwka/vim-smoothie", - event = "CursorMoved", -} diff --git a/lua/ben/plugins/treesitter.lua b/lua/ben/plugins/treesitter.lua index 279fa1a..9315bdf 100644 --- a/lua/ben/plugins/treesitter.lua +++ b/lua/ben/plugins/treesitter.lua @@ -33,9 +33,6 @@ return { "gomod", "gowork", "gosum", - "latex", - "bibtex", - "rnoweb", "org", "rust", "c", @@ -51,8 +48,6 @@ return { "awk", "sql", "ssh_config", - "sxhkdrc", - "nix", "xml", "csv", "dockerfile", diff --git a/lua/ben/plugins/yadm.lua b/lua/ben/plugins/yadm.lua index de6389e..7d6440b 100644 --- a/lua/ben/plugins/yadm.lua +++ b/lua/ben/plugins/yadm.lua @@ -1,13 +1,13 @@ return { - "robstumborg/yadm.nvim", - dependencies = "tpope/vim-fugitive", - -- Only load if yadm is installed - cond = function() - return vim.fn.executable("yadm") == 1 - end, - config = function() - require("yadm").setup({ - yadm_dir = vim.fn.expand("$HOME/.local/share/yadm/repo.git"), - }) - end, + "takinoy/yadm.nvim", + dependencies = "tpope/vim-fugitive", + -- Only load if yadm is installed + cond = function() + return vim.fn.executable("yadm") == 1 + end, + config = function() + require("yadm").setup({ + yadm_dir = vim.fn.expand("$HOME/.local/share/yadm/repo.git"), + }) + end, } -- cgit v1.2.3