From 172e94d2f87aba4a0c26d82b56991639c7016d0c Mon Sep 17 00:00:00 2001 From: ipu Date: Thu, 16 Jan 2025 20:56:04 +0300 Subject: [PATCH] add tmuxinator configs; nvim configs --- i3/.config/i3/config | 3 -- nvim/.config/nvim/init.lua | 41 +++++++------- nvim/.config/nvim/lazy-lock.json | 6 +++ .../nvim/lua/custom/plugins/comment.lua | 1 + .../.config/nvim/lua/custom/plugins/neorg.lua | 34 ++++++++++++ .../nvim/lua/kickstart/plugins/neo-tree.lua | 2 + tmux/.config/tmuxinator/algo.yml | 41 -------------- tmux/.config/tmuxinator/bootdev-cpp.yml | 41 -------------- tmux/.config/tmuxinator/learn-go.yml | 52 ++++++++++++++++++ tmux/.config/tmuxinator/mediaserv.yml | 53 +++++++++++++++++++ tmux/.config/tmuxinator/notes.yml | 10 ++++ tmux/.config/tmuxinator/work-ape.yml | 40 -------------- tmux/.config/tmuxinator/work-fomo.yml | 15 ++++++ tmux/.tmux.conf | 4 ++ tmux/.tmux/plugins/tmux-gruvbox | 1 - tmux/.tmux/plugins/tmux-resurrect | 1 - tmux/.tmux/plugins/tmux-sensible | 1 - tmux/.tmux/plugins/tpm | 1 - 18 files changed, 199 insertions(+), 148 deletions(-) create mode 100644 nvim/.config/nvim/lua/custom/plugins/neorg.lua create mode 100644 tmux/.config/tmuxinator/learn-go.yml create mode 100644 tmux/.config/tmuxinator/mediaserv.yml create mode 100644 tmux/.config/tmuxinator/notes.yml create mode 100644 tmux/.config/tmuxinator/work-fomo.yml delete mode 160000 tmux/.tmux/plugins/tmux-gruvbox delete mode 160000 tmux/.tmux/plugins/tmux-resurrect delete mode 160000 tmux/.tmux/plugins/tmux-sensible delete mode 160000 tmux/.tmux/plugins/tpm diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 0ecf07e..90be181 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -219,9 +219,6 @@ colors { } } -bindsym ISO_Next_Group exec pkill -RTMIN+3 i3blocks - - # set floating (nontiling) for apps needing it for_window [class="Yad" instance="yad"] floating enable for_window [class="Galculator" instance="galculator"] floating enable diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 67da455..24add9d 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -124,6 +124,15 @@ vim.api.nvim_create_autocmd("TextYankPost", { end, }) +-- local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {}) +-- vim.api.nvim_create_autocmd("BufWritePre", { +-- pattern = "*.go", +-- callback = function() +-- require("go.format").gofmt() +-- end, +-- group = format_sync_grp, +-- }) + -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" @@ -539,8 +548,8 @@ require("lazy").setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, + clangd = {}, + gopls = {}, basedpyright = { settings = { basedpyright = { @@ -552,20 +561,6 @@ require("lazy").setup({ }, }, - ruff = { - settings = { - pyright = { - -- Using Ruff's import organizer - disableOrganizeImports = true, - }, - python = { - analysis = { - -- Ignore all files for analysis to exclusively use Ruff for linting - -- ignore = { "*" }, - }, - }, - }, - }, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -604,8 +599,10 @@ require("lazy").setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { "stylua", -- Used to format Lua code - "black", + "ruff", "isort", + "goimports", + "gofumpt", }) require("mason-tool-installer").setup({ ensure_installed = ensure_installed }) @@ -660,6 +657,7 @@ require("lazy").setup({ lua = { "stylua" }, -- Conform can also run multiple formatters sequentially python = { "isort", "black" }, + go = { "gofumpt" }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -867,6 +865,11 @@ require("lazy").setup({ "query", "vim", "vimdoc", + "go", + "gomod", + "gowork", + "gosum", + "python", }, -- Autoinstall languages that are not installed auto_install = true, @@ -914,7 +917,7 @@ require("lazy").setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = "custom.plugins" }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! @@ -943,4 +946,4 @@ require("lazy").setup({ }) -- The line beneath this is called `modeline`. See `:help modeline` --- vim: ts=2 sts=2 sw=2 et +-- vim: ts=2 sts=2 sw=2 diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 135550f..e8eafc9 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,4 +1,5 @@ { + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "659c4479529a05cc9b05ef762639a09d366cc690" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, @@ -9,19 +10,24 @@ "gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" }, "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "magma-nvim": { "branch": "main", "commit": "ff3deba8a879806a51c005e50782130246143d06" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.nvim": { "branch": "main", "commit": "7b4d5d48b6b5a75009d63f8f3e4ef4819b7e8139" }, "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "neorg": { "branch": "main", "commit": "81ee90cb2d72ac43bfadb7dd276646f34c8f85be" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, "nvim-lspconfig": { "branch": "master", "commit": "d2d153a179ed59aa7134d7ebdf4d7dcb156efa22" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-treesitter": { "branch": "master", "commit": "e1e3108cd23d7f967842261bd66126b6734d8907" }, "nvim-treesitter-context": { "branch": "master", "commit": "1147c42cf9477701581d1eb31e1735969e21dd06" }, "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, + "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, diff --git a/nvim/.config/nvim/lua/custom/plugins/comment.lua b/nvim/.config/nvim/lua/custom/plugins/comment.lua index 0ffb6cb..72837f7 100644 --- a/nvim/.config/nvim/lua/custom/plugins/comment.lua +++ b/nvim/.config/nvim/lua/custom/plugins/comment.lua @@ -2,3 +2,4 @@ return { "numToStr/Comment.nvim", opts = {}, } +-- vim: ts=2 sts=2 sw=2 diff --git a/nvim/.config/nvim/lua/custom/plugins/neorg.lua b/nvim/.config/nvim/lua/custom/plugins/neorg.lua new file mode 100644 index 0000000..60ee666 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/neorg.lua @@ -0,0 +1,34 @@ +return { + "nvim-neorg/neorg", + lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default + version = "*", -- Pin Neorg to the latest stable release + config = function() + require("neorg").setup({ + load = { + ["core.defaults"] = {}, + ["core.concealer"] = { + config = { + icons = { + code_block = { + conceal = true, + }, + }, + }, + }, + ["core.dirman"] = { + config = { + workspaces = { + notes = "~/Documents/notes/neorg/", + }, + default_workspace = "notes", + }, + }, + ["core.itero"] = {}, + }, + }) + vim.wo.foldlevel = 99 + vim.wo.conceallevel = 2 + end, +} + +-- vim: ts=2 sts=2 sw=2 diff --git a/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua b/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua index 3d2a712..8868316 100644 --- a/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua +++ b/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua @@ -23,3 +23,5 @@ return { }, }, } + +-- vim: ts=2 sts=2 sw=2 diff --git a/tmux/.config/tmuxinator/algo.yml b/tmux/.config/tmuxinator/algo.yml index 693e71e..ca06552 100644 --- a/tmux/.config/tmuxinator/algo.yml +++ b/tmux/.config/tmuxinator/algo.yml @@ -3,47 +3,6 @@ name: algo root: ~/Code/my/algo/ -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - windows: - editor: - nvimp . diff --git a/tmux/.config/tmuxinator/bootdev-cpp.yml b/tmux/.config/tmuxinator/bootdev-cpp.yml index 2660ea2..7e258e0 100644 --- a/tmux/.config/tmuxinator/bootdev-cpp.yml +++ b/tmux/.config/tmuxinator/bootdev-cpp.yml @@ -3,47 +3,6 @@ name: bootdev-cpp root: ~/Code/my/bootdev/cpp/ -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - windows: - editor: - nvim . diff --git a/tmux/.config/tmuxinator/learn-go.yml b/tmux/.config/tmuxinator/learn-go.yml new file mode 100644 index 0000000..97eafa5 --- /dev/null +++ b/tmux/.config/tmuxinator/learn-go.yml @@ -0,0 +1,52 @@ +# /home/ipu/.config/tmuxinator/learn-go.yml + +name: learn-go +root: ~/Code/my/bootdev/go-learn/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - editor: + - nvim main.go + - shell: + - + diff --git a/tmux/.config/tmuxinator/mediaserv.yml b/tmux/.config/tmuxinator/mediaserv.yml new file mode 100644 index 0000000..96c741f --- /dev/null +++ b/tmux/.config/tmuxinator/mediaserv.yml @@ -0,0 +1,53 @@ +# /home/ipu/.config/tmuxinator/mediaserv.yml + +name: mediaserv +root: ~/Code/my/mediaserv/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - editor: + - nvimp . + - shell: + - + - git: + - lazygit diff --git a/tmux/.config/tmuxinator/notes.yml b/tmux/.config/tmuxinator/notes.yml new file mode 100644 index 0000000..9fcc5be --- /dev/null +++ b/tmux/.config/tmuxinator/notes.yml @@ -0,0 +1,10 @@ +# /home/ipu/.config/tmuxinator/notes.yml + +name: notes +root: ~/Documents/notes/neorg/ + +windows: + - editor: + - nvim index.norg + - shell: + - diff --git a/tmux/.config/tmuxinator/work-ape.yml b/tmux/.config/tmuxinator/work-ape.yml index 6cf9309..39cdcdb 100644 --- a/tmux/.config/tmuxinator/work-ape.yml +++ b/tmux/.config/tmuxinator/work-ape.yml @@ -3,46 +3,6 @@ name: work-ape root: ~/Code/work/ape/ -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false windows: - server: diff --git a/tmux/.config/tmuxinator/work-fomo.yml b/tmux/.config/tmuxinator/work-fomo.yml new file mode 100644 index 0000000..86a5a64 --- /dev/null +++ b/tmux/.config/tmuxinator/work-fomo.yml @@ -0,0 +1,15 @@ +# /home/ipu/.config/tmuxinator/work-fomo.yml + +name: work-fomo +root: ~/Code/work/fomo/fomo_bot/ + + +windows: + - nvim: + - cd app + - nvimp . + - shell: + - + - git: + - cd app + - lazygit diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 783de04..08c4378 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -4,6 +4,7 @@ set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'egel/tmux-gruvbox' set -g @tmux-gruvbox 'dark' +set -g @plugin 'omerxx/tmux-sessionx' run '~/.tmux/plugins/tpm/tpm' @@ -17,3 +18,6 @@ unbind C-b set-option -g prefix C-a bind-key C-a send-prefix +# tmux sessionx - turn on tmuxinator mode +set -g @sessionx-tmuxinator-mode 'on' +set -g @sessionx-zoxide-mode 'on' diff --git a/tmux/.tmux/plugins/tmux-gruvbox b/tmux/.tmux/plugins/tmux-gruvbox deleted file mode 160000 index 245e314..0000000 --- a/tmux/.tmux/plugins/tmux-gruvbox +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 245e31430fb7298e02ef0d4030905b49d0385746 diff --git a/tmux/.tmux/plugins/tmux-resurrect b/tmux/.tmux/plugins/tmux-resurrect deleted file mode 160000 index cff343c..0000000 --- a/tmux/.tmux/plugins/tmux-resurrect +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cff343cf9e81983d3da0c8562b01616f12e8d548 diff --git a/tmux/.tmux/plugins/tmux-sensible b/tmux/.tmux/plugins/tmux-sensible deleted file mode 160000 index 25cb91f..0000000 --- a/tmux/.tmux/plugins/tmux-sensible +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/tmux/.tmux/plugins/tpm b/tmux/.tmux/plugins/tpm deleted file mode 160000 index 99469c4..0000000 --- a/tmux/.tmux/plugins/tpm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946