mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 22:22:40 +00:00
Compare commits
40 Commits
9bb33cfaee
...
lazynvim
| Author | SHA1 | Date | |
|---|---|---|---|
|
ee7854eafc
|
|||
|
ef961fcfa8
|
|||
|
6d44edc94d
|
|||
|
381d272da1
|
|||
|
38e77e8fcd
|
|||
|
2a5c2cdc58
|
|||
|
0949f9e9fa
|
|||
|
2c7bd9123f
|
|||
|
f325d61131
|
|||
|
ae13738a4d
|
|||
|
6c84428179
|
|||
|
d27f2ad490
|
|||
|
ea7033bea8
|
|||
|
a835414bd1
|
|||
|
82341d87df
|
|||
|
9e48ba0a77
|
|||
|
3518ba059f
|
|||
|
c8e869c853
|
|||
|
b1633707c2
|
|||
|
5f45954d98
|
|||
|
4fb2b70004
|
|||
|
a86116056f
|
|||
|
f43cd2c543
|
|||
|
48d0e16f6a
|
|||
|
27d66acb6e
|
|||
|
af77a986e2
|
|||
|
1dd7460ac4
|
|||
|
3badd6a046
|
|||
|
0a9e065b4d
|
|||
|
8ac60b4196
|
|||
|
7f26013d1c
|
|||
|
42cef6e0c4
|
|||
|
241c43767c
|
|||
|
4b39a3eb95
|
|||
|
1e427911ac
|
|||
|
0c15983dae
|
|||
|
68d3f5a183
|
|||
|
d9ea8d80c6
|
|||
|
eed9c143ea
|
|||
|
d06648864e
|
@@ -161,7 +161,7 @@ home=~/.config/ansible
|
||||
;bin_ansible_callbacks=False
|
||||
|
||||
# (tmppath) Temporary directory for Ansible to use on the controller.
|
||||
local_tmp=~/.local/ansible/tmp
|
||||
local_tmp=~/.local/share/ansible/tmp
|
||||
|
||||
# (list) List of logger names to filter out of the log file
|
||||
;log_filter=
|
||||
@@ -261,10 +261,10 @@ roles_path={{ ANSIBLE_HOME ~ "~/.local/ansible/roles:/roles:/usr/share/ansible/r
|
||||
;vars_plugins={{ ANSIBLE_HOME ~ "/plugins/vars:/usr/share/ansible/plugins/vars" }}
|
||||
|
||||
# (string) The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The --encrypt-vault-id cli option overrides the configured value.
|
||||
;vault_encrypt_identity=
|
||||
vault_encrypt_identity=michael
|
||||
|
||||
# (string) The label to use for the default vault id label in cases where a vault id label is not provided
|
||||
;vault_identity=default
|
||||
vault_identity=michael
|
||||
|
||||
# (list) A list of vault-ids to use by default. Equivalent to multiple --vault-id args. Vault-ids are tried in order.
|
||||
;vault_identity_list=
|
||||
@@ -274,7 +274,7 @@ roles_path={{ ANSIBLE_HOME ~ "~/.local/ansible/roles:/roles:/usr/share/ansible/r
|
||||
|
||||
# (path) The vault password file to use. Equivalent to --vault-password-file or --vault-id
|
||||
# If executable, it will be run and the resulting stdout will be used as the password.
|
||||
vault_password_file=~/.local/ansible/.vaultpwd
|
||||
vault_password_file=~/.local/share/scripts/vault-gopass-client
|
||||
|
||||
# (integer) Sets the default verbosity, equivalent to the number of ``-v`` passed in the command line.
|
||||
;verbosity=0
|
||||
@@ -982,4 +982,3 @@ cache_dir=~/.cache/ansible
|
||||
# Setting this option to V(inventory) will only run the vars plugin after parsing inventory.
|
||||
# If this option is omitted, the global C(RUN_VARS_PLUGINS) configuration is used to determine when to execute the vars plugin.
|
||||
;stage=
|
||||
|
||||
|
||||
8
nvim/lazynvim/.gitignore
vendored
Normal file
8
nvim/lazynvim/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
15
nvim/lazynvim/.neoconf.json
Normal file
15
nvim/lazynvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
201
nvim/lazynvim/LICENSE
Normal file
201
nvim/lazynvim/LICENSE
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
4
nvim/lazynvim/README.md
Normal file
4
nvim/lazynvim/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# 💤 LazyVim
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||
20
nvim/lazynvim/after/ftplugin/markdown.lua
Normal file
20
nvim/lazynvim/after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- Markdown specific key maps.
|
||||
--
|
||||
local todos = require("todo-comments")
|
||||
local keywords = { "WARN", "WARNING", "IMPORTANT" }
|
||||
|
||||
-- Show all the warnings in the quick fix list.
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>tw",
|
||||
"<CMD>Trouble todo toggle filter = {tag = {WARN, IMPORTANT}}<CR>",
|
||||
{ desc = "[T]odo [W]arnings" }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "]w", function()
|
||||
todos.jump_next({ keywords = keywords })
|
||||
end, { desc = "Next [W]arning" })
|
||||
|
||||
vim.keymap.set("n", "[w", function()
|
||||
todos.jump_prev({ keywords = keywords })
|
||||
end, { desc = "Previous [W]arning" })
|
||||
2
nvim/lazynvim/after/ftplugin/swift.lua
Normal file
2
nvim/lazynvim/after/ftplugin/swift.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
2
nvim/lazynvim/init.lua
Normal file
2
nvim/lazynvim/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
14
nvim/lazynvim/lazyvim.json
Normal file
14
nvim/lazynvim/lazyvim.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.coding.luasnip",
|
||||
"lazyvim.plugins.extras.editor.harpoon2",
|
||||
"lazyvim.plugins.extras.formatting.prettier",
|
||||
"lazyvim.plugins.extras.lang.ansible",
|
||||
"lazyvim.plugins.extras.lang.clangd",
|
||||
"lazyvim.plugins.extras.lang.docker"
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "10960"
|
||||
},
|
||||
"version": 7
|
||||
}
|
||||
50
nvim/lazynvim/lua/config/autocmds.lua
Normal file
50
nvim/lazynvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local defaultGroupOptions = { clear = true }
|
||||
local markdownGroup = vim.api.nvim_create_augroup("MyMarkdownGroup", defaultGroupOptions)
|
||||
local spellGroup = vim.api.nvim_create_augroup("SpellGroup", defaultGroupOptions)
|
||||
local createCmd = vim.api.nvim_create_autocmd
|
||||
|
||||
-- Spell check
|
||||
createCmd("BufEnter", {
|
||||
pattern = { "*.md", "*.markdown", "*.txt", "*.tex" },
|
||||
group = spellGroup,
|
||||
callback = function(_)
|
||||
vim.cmd.setlocal("textwidth=80")
|
||||
vim.cmd.setlocal("spell spelllang=en_us")
|
||||
end,
|
||||
})
|
||||
|
||||
-- Markdown
|
||||
createCmd("BufWritePost", {
|
||||
pattern = { "*.md", "*.markdown" },
|
||||
group = markdownGroup,
|
||||
callback = function(_)
|
||||
local cursor = vim.fn.getpos(".")
|
||||
vim.cmd("FormatWrite")
|
||||
vim.fn.setpos(".", cursor)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Go
|
||||
createCmd("BufWritePre", {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
require("go.format").goimport()
|
||||
end,
|
||||
group = vim.api.nvim_create_augroup("GoFormat", defaultGroupOptions),
|
||||
})
|
||||
|
||||
vim.api.nvim_exec2(
|
||||
[[
|
||||
autocmd BufNewFile,BufRead /private/**/gopass** setlocal noswapfile nobackup noundofile shada=""
|
||||
]],
|
||||
{}
|
||||
)
|
||||
|
||||
-- Highlight when yanking.
|
||||
createCmd("TextYankPost", {
|
||||
desc = "Highlight when yanking text.",
|
||||
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
46
nvim/lazynvim/lua/config/keymaps.lua
Normal file
46
nvim/lazynvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
local keymap = vim.keymap.set
|
||||
local default_options = { noremap = true, silent = true }
|
||||
local wk = require("which-key")
|
||||
|
||||
local wk_add = function(mode, keymaps)
|
||||
wk.add(keymaps, { mode = mode, silent = true })
|
||||
end
|
||||
|
||||
keymap("i", "jk", "<ESC>", default_options)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Normal Mode
|
||||
--------------------------------------------------------------------------------
|
||||
wk_add("n", {
|
||||
{ "<Left>", ":vertical resize +1<CR>", desc = "Resize Pane Left" },
|
||||
{ "<Right>", ":vertical resize -1<CR>", desc = "Resize Pane Right" },
|
||||
{ "<Up>", "resize -1<CR>", desc = "Resize Pane Up" },
|
||||
{ "<Down>", "resize +1<CR>", desc = "Resize Pane Down" },
|
||||
|
||||
{ "<leader>n", "<CMD>:noh<CR>", desc = "[N]o highlighting" },
|
||||
{ "<leader>s", "<CMD>:set spell!<CR>", desc = "[S]pell check toggle" },
|
||||
{ "<C-s>", "<CMD>:write<CR>", desc = "[S]ave" },
|
||||
|
||||
{ "J", ":move .+1<CR>==", desc = "Move line down" },
|
||||
{ "K", ":move .-2<CR>==", desc = "Move line up" },
|
||||
|
||||
{ "<leader>z", "<CMD>:ZenMode<CR>", desc = "[Z]en Mode" },
|
||||
})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Visual Mode
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
vim.keymap.set("v", "K", ":move '<-2<CR>gv=gv", { desc = "Move selected block up.", silent = true, noremap = true })
|
||||
vim.keymap.set("v", "J", ":move '>+1<CR>gv=gv", { desc = "Move selected block up.", silent = true, noremap = true })
|
||||
|
||||
-- Toggle term key maps, that get attached when terminal is opened.
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = { buffer = 0 }
|
||||
keymap("t", "<esc>", [[<C-\><C-n>]], opts)
|
||||
end
|
||||
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")
|
||||
53
nvim/lazynvim/lua/config/lazy.lua
Normal file
53
nvim/lazynvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
72
nvim/lazynvim/lua/config/options.lua
Normal file
72
nvim/lazynvim/lua/config/options.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
--
|
||||
local o = vim.opt
|
||||
local wo = vim.wo
|
||||
local fn = vim.fn
|
||||
|
||||
vim.cmd.set("inccommand=split")
|
||||
o.filetype = "on"
|
||||
o.updatetime = 500 -- faster completion
|
||||
o.timeoutlen = 800 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
o.ttimeoutlen = 300 -- Time in milliseconds to wait for a key code sequence to complete
|
||||
o.backup = false -- creates a backup file
|
||||
o.swapfile = false -- enable/disable swap file creation
|
||||
o.dir = fn.stdpath("data") .. "/swp" -- swap file directory
|
||||
o.undofile = false -- enable/disable undo file creation
|
||||
o.undodir = fn.stdpath("data") .. "/undodir" -- set undo directory
|
||||
o.history = 500 -- Use the 'history' option to set the number of lines from command mode that are remembered.
|
||||
o.hidden = true -- required to keep multiple buffers and open multiple buffers
|
||||
o.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
|
||||
o.fileencoding = "utf-8" -- the encoding written to a file
|
||||
o.conceallevel = 0 -- so that `` is visible in markdown files
|
||||
o.number = true -- set numbered lines
|
||||
o.relativenumber = true -- set relative numbered lines
|
||||
o.cmdheight = 1 -- space for displaying messages/commands
|
||||
o.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||
o.showtabline = 2 -- always show tabs
|
||||
o.laststatus = 2 -- The value of this option influences when the last window will have a status line (2 always)
|
||||
o.smartcase = true -- smart case
|
||||
o.smartindent = true -- make indenting smarter again
|
||||
o.splitbelow = true -- force all horizontal splits to go below current window
|
||||
o.splitright = true -- force all vertical splits to go to the right of current window
|
||||
o.autoindent = true -- turn on auto indent.
|
||||
o.expandtab = true -- convert tabs to spaces
|
||||
o.smarttab = true -- turn on smart tab
|
||||
o.shiftwidth = 2 -- the number of spaces inserted for each indentation
|
||||
o.tabstop = 2 -- how many columns a tab counts for
|
||||
o.termguicolors = true -- set term gui colors (most terminals support this)
|
||||
o.cursorline = true -- highlight the current line
|
||||
o.scrolloff = 20 -- Minimal number of screen lines to keep above and below the cursor
|
||||
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
|
||||
o.hlsearch = false -- highlight all matches on previous search pattern
|
||||
o.ignorecase = true -- ignore case in search patterns
|
||||
o.foldenable = false -- disable folding; enable with zi
|
||||
o.foldmethod = "expr"
|
||||
o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.cmd.set("nolist") -- don't show listchars.
|
||||
-- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<"
|
||||
o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣"
|
||||
o.shortmess = o.shortmess + "c" -- prevent "pattern not found" messages
|
||||
wo.colorcolumn = "99999"
|
||||
o.wildmode = "full"
|
||||
o.lazyredraw = false -- do not redraw screen while running macros
|
||||
o.grepprg = "rg --hidden --vimgrep --smart-case --"
|
||||
o.completeopt = { "menu", "menuone", "noselect", "noinsert" } -- A comma separated list of options for Insert mode completion
|
||||
o.wildignorecase = true -- When set case is ignored when completing file names and directories
|
||||
o.wildignore = [[
|
||||
.git,.hg,.svn
|
||||
*.aux,*.out,*.toc
|
||||
*.o,*.obj,*.exe,*.dll,*.manifest,*.rbc,*.class
|
||||
*.ai,*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png,*.psd,*.webp
|
||||
*.avi,*.divx,*.mp4,*.webm,*.mov,*.m2ts,*.mkv,*.vob,*.mpg,*.mpeg
|
||||
*.mp3,*.oga,*.ogg,*.wav,*.flac
|
||||
*.eot,*.otf,*.ttf,*.woff
|
||||
*.doc,*.pdf,*.cbr,*.cbz
|
||||
*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb
|
||||
*.swp,.lock,.DS_Store,._*
|
||||
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
|
||||
]]
|
||||
o.viminfo = "" -- disable viminfo from copying information from current session, for security.
|
||||
vim.g.snacks_animate = false
|
||||
9
nvim/lazynvim/lua/plugins/colorscheme.lua
Normal file
9
nvim/lazynvim/lua/plugins/colorscheme.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
}
|
||||
3
nvim/lazynvim/lua/plugins/disabled.lua
Normal file
3
nvim/lazynvim/lua/plugins/disabled.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
||||
}
|
||||
23
nvim/lazynvim/lua/plugins/fidget.lua
Normal file
23
nvim/lazynvim/lua/plugins/fidget.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local fidget = require("fidget")
|
||||
fidget.setup({
|
||||
notification = {
|
||||
window = {
|
||||
normal_hl = "String", -- Base highlight group in the notification window
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
border = "rounded", -- Border around the notification window
|
||||
zindex = 45, -- Stacking priority of the notification window
|
||||
max_width = 0, -- Maximum width of the notification window
|
||||
max_height = 0, -- Maximum height of the notification window
|
||||
x_padding = 1, -- Padding from right edge of window boundary
|
||||
y_padding = 1, -- Padding from bottom edge of window boundary
|
||||
align = "bottom", -- How to align the notification window
|
||||
relative = "editor", -- What the notification window position is relative to
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
23
nvim/lazynvim/lua/plugins/formatter.lua
Normal file
23
nvim/lazynvim/lua/plugins/formatter.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stulua" },
|
||||
markdown = {
|
||||
"prettier",
|
||||
prepend_args = {
|
||||
"--print-width",
|
||||
"100",
|
||||
"--prose-wrap",
|
||||
"always",
|
||||
"--parser",
|
||||
"markdown",
|
||||
},
|
||||
},
|
||||
swift = { "swiftformat" },
|
||||
-- ["*"] = {
|
||||
-- require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
}
|
||||
78
nvim/lazynvim/lua/plugins/harpoon.lua
Normal file
78
nvim/lazynvim/lua/plugins/harpoon.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
opts = {
|
||||
settings = {
|
||||
save_on_toggle = true,
|
||||
sync_on_ui_close = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<C-e>",
|
||||
function()
|
||||
require("harpoon").ui:toggle_quick_menu(require("harpoon"):list())
|
||||
end,
|
||||
desc = "Open Harpoon window.",
|
||||
},
|
||||
{
|
||||
"<leader>a",
|
||||
function()
|
||||
require("harpoon"):list():add()
|
||||
end,
|
||||
desc = "[A]dd to the harpoon list.",
|
||||
},
|
||||
{
|
||||
"<A-y>",
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end,
|
||||
desc = "Select first harpoon buffer.",
|
||||
},
|
||||
{
|
||||
"<A-u>",
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end,
|
||||
desc = "Select second harpoon buffer.",
|
||||
},
|
||||
{
|
||||
"<A-i>",
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end,
|
||||
desc = "Select third harpoon buffer.",
|
||||
},
|
||||
{
|
||||
"<A-o>",
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end,
|
||||
desc = "Select fourth harpoon buffer.",
|
||||
},
|
||||
{
|
||||
"<C-[>",
|
||||
function()
|
||||
require("harpoon"):list():prev()
|
||||
end,
|
||||
desc = "Previous harpoon buffer.",
|
||||
},
|
||||
{
|
||||
"<C-]>",
|
||||
function()
|
||||
require("harpoon"):list():next()
|
||||
end,
|
||||
desc = "Next harpoon buffer.",
|
||||
},
|
||||
-- Extensions
|
||||
require("harpoon"):extend({
|
||||
UI_CREATE = function(cx)
|
||||
vim.keymap.set("n", "<C-v>", function()
|
||||
require("harpoon").ui:select_menu_item({ vsplit = true })
|
||||
end, { buffer = cx.buffer, desc = "Open in [V]split" })
|
||||
end,
|
||||
}),
|
||||
},
|
||||
},
|
||||
}
|
||||
32
nvim/lazynvim/lua/plugins/init.lua
Normal file
32
nvim/lazynvim/lua/plugins/init.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- Plugins that don't require much configuration are in here.
|
||||
--
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.ansible" },
|
||||
{ import = "lazyvim.plugins.extras.lang.cmake" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
||||
{
|
||||
import = "lazyvim.plugins.extras.editor.mini-files",
|
||||
opts = {
|
||||
options = {
|
||||
use_as_default_explorer = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
indent = { enabled = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
import = "lazyvim.plugins.extras.coding.blink",
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
["<C-y>"] = { "select_and_accept" },
|
||||
},
|
||||
},
|
||||
}
|
||||
147
nvim/lazynvim/lua/plugins/lsp.lua
Normal file
147
nvim/lazynvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,147 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"clangd",
|
||||
"marksman",
|
||||
"shfmt",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"cmake",
|
||||
"dockerfile",
|
||||
"editorconfig",
|
||||
"ini",
|
||||
"json",
|
||||
"jq",
|
||||
"latex",
|
||||
"make",
|
||||
"swift",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
servers = {
|
||||
bashls = {},
|
||||
clangd = {},
|
||||
dockerls = {},
|
||||
gopls = {},
|
||||
jsonls = {},
|
||||
lua_ls = {},
|
||||
marksman = {},
|
||||
sourcekit = {},
|
||||
yamlls = {},
|
||||
},
|
||||
setup = {
|
||||
clangd = function(_, opts)
|
||||
opts.capabilities.offsetEncoding = { "utf-16" }
|
||||
end,
|
||||
sourcekit = function(_, opts)
|
||||
opts.cmd = {
|
||||
vim.trim(vim.fn.system("xcrun -f sourcekit-lsp")) or nil
|
||||
}
|
||||
end
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- return {
|
||||
-- "neovim/nvim-lspconfig",
|
||||
-- event = { "BufReadPre", "BufNewFile" },
|
||||
-- dependencies = {
|
||||
-- "hrsh7th/cmp-nvim-lsp",
|
||||
-- { "antosha417/nvim-lsp-file-operations", config = true },
|
||||
-- "williamboman/mason.nvim",
|
||||
-- "williamboman/mason-lspconfig.nvim",
|
||||
-- {
|
||||
-- "folke/lazydev.nvim",
|
||||
-- ft = "lua",
|
||||
-- opts = {
|
||||
-- library = {
|
||||
-- { path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require("mason").setup()
|
||||
-- require("mason-lspconfig").setup({
|
||||
-- opts = {
|
||||
-- ensure_installed = lsp_servers,
|
||||
-- },
|
||||
-- })
|
||||
-- local lspconfig = require("lspconfig")
|
||||
-- local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
-- local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
-- local opts = { noremap = true, silent = true }
|
||||
-- local on_attach = function(_, bufnr)
|
||||
-- opts.buffer = bufnr
|
||||
--
|
||||
-- opts.desc = "Show line diagnostics"
|
||||
-- vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
||||
--
|
||||
-- opts.desc = "Show diagnostics in Telescope"
|
||||
-- vim.keymap.set("n", "<leader><leader>d", "<CMD>Telescope diagnostics bufnr=0<CR>", opts)
|
||||
--
|
||||
-- opts.desc = "Show documentation for what is under cursor"
|
||||
-- vim.keymap.set("n", "<C-k>", vim.lsp.buf.hover, opts)
|
||||
--
|
||||
-- opts.desc = "[G]oto [D]efinition"
|
||||
-- vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions trim_text=true<cr>", opts)
|
||||
--
|
||||
-- opts.desc = "[G]oto [D]eclaration"
|
||||
-- vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
--
|
||||
-- opts.desc = "LSP [C]ode [A]ction"
|
||||
-- vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
--
|
||||
-- --opts.desc = "[R]e-[N]ame"
|
||||
-- --vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
--
|
||||
-- opts.desc = "[R]eload or start LSP"
|
||||
-- vim.keymap.set("n", "<leader>rl", ":LspRestart | :LspStart<CR>", opts)
|
||||
--
|
||||
-- opts.desc = "Goto previous diagnostic"
|
||||
-- vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||
--
|
||||
-- opts.desc = "Goto next diagnostic"
|
||||
-- vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||
-- end
|
||||
--
|
||||
-- for _, lsp in ipairs(lsp_servers) do
|
||||
-- lspconfig[lsp].setup({
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- on_init = function(client)
|
||||
-- -- HACK: to fix some issues with LSP
|
||||
-- -- more details: https://github.com/neovim/neovim/issues/19237#issuecomment-2237037154
|
||||
-- client.offset_encoding = "utf-8"
|
||||
-- end,
|
||||
-- cmd = lsp == "sourcekit" and { vim.trim(vim.fn.system("xcrun -f sourcekit-lsp")) } or nil,
|
||||
-- })
|
||||
-- end
|
||||
--
|
||||
-- -- nice icons
|
||||
-- local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
-- for type, icon in pairs(signs) do
|
||||
-- local hl = "DiagnosticSign" .. type
|
||||
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
-- end
|
||||
--
|
||||
-- -- For some reason I was having trouble getting this to work inside the on-attach, so it's here.
|
||||
-- vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e-[N]ame" })
|
||||
-- end,
|
||||
-- }
|
||||
39
nvim/lazynvim/lua/plugins/luasnip.lua
Normal file
39
nvim/lazynvim/lua/plugins/luasnip.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
opts = function()
|
||||
LazyVim.cmp.actions.snippet_forward = function()
|
||||
if require("luasnip").jumpable(1) then
|
||||
require("luasnip").jump(1)
|
||||
return true
|
||||
end
|
||||
end
|
||||
LazyVim.cmp.actions.snippet_stop = function()
|
||||
if require("luasnip").expand_or_jumpable() then -- or just jumpable(1) is fine?
|
||||
require("luasnip").unlink_current()
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<C-k>",
|
||||
mode = { "i", "s" },
|
||||
function()
|
||||
if ls.expand_or_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
"<C-j>",
|
||||
mode = { "i", "s" },
|
||||
function()
|
||||
if ls.jumpable(-1) then
|
||||
ls.jump(-1)
|
||||
end
|
||||
end
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
36
nvim/lazynvim/lua/plugins/oil.lua
Normal file
36
nvim/lazynvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
"stevearc/oil.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = {
|
||||
columns = { "icon" },
|
||||
keymaps = {
|
||||
["<C-h>"] = false,
|
||||
["<M-h>"] = "actions.select_split",
|
||||
["<C-v>"] = {
|
||||
"actions.select",
|
||||
opts = { vertical = true },
|
||||
desc = "Open the entry in a vertical split",
|
||||
},
|
||||
view_options = {
|
||||
is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
|
||||
-- Don't show .DS_Store in output.
|
||||
local is_ds_store = name ~= ".DS_Store"
|
||||
return not is_ds_store
|
||||
end,
|
||||
},
|
||||
}
|
||||
},
|
||||
keys = {
|
||||
-- Show the parent directory in current window.
|
||||
{ "-", "<CMD>Oil<CR>", desc = "Open parent directory." },
|
||||
-- Open parent directory in floating window.
|
||||
{
|
||||
"<space>-",
|
||||
function() require("oil").toggle_float() end,
|
||||
desc = "Open parent directory in floating window."
|
||||
},
|
||||
},
|
||||
}
|
||||
10
nvim/lazynvim/lua/plugins/telescope.lua
Normal file
10
nvim/lazynvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
{
|
||||
import = "lazyvim.plugins.extras.editor.telescope",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"swift",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
14
nvim/lazynvim/lua/plugins/todo-comment.lua
Normal file
14
nvim/lazynvim/lua/plugins/todo-comment.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>xt", false },
|
||||
{ "<leader>xT", false },
|
||||
{ "<leader>tq", "<CMD>Trouble todo toggle<CR>", desc = "[T]odo [Q]uick fix list." },
|
||||
{ "<leader><leader>t", "<CMD>TodoTelescope<CR>", desc = "[T]odo telescope list." },
|
||||
{ "<leader>tl", "<CMD>TodoLocList<CR>", desc = "[T]odo [L]ocation list." },
|
||||
},
|
||||
}
|
||||
73
nvim/lazynvim/lua/plugins/xcodebuild.lua
Normal file
73
nvim/lazynvim/lua/plugins/xcodebuild.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
local progress_handle
|
||||
|
||||
return {
|
||||
"wojciech-kulik/xcodebuild.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
opts = {
|
||||
show_build_progress_bar = false,
|
||||
logs = {
|
||||
auto_open_on_success_tests = false,
|
||||
auto_open_on_failed_tests = false,
|
||||
auto_open_on_success_build = false,
|
||||
auto_open_on_failed_build = false,
|
||||
auto_focus = false,
|
||||
auto_close_on_app_launch = true,
|
||||
only_summary = true,
|
||||
notify = function(message, severity)
|
||||
local fidget = require("fidget")
|
||||
if progress_handle then
|
||||
progress_handle.message = message
|
||||
if not message:find("Loading") then
|
||||
progress_handle:finish()
|
||||
progress_handle = nil
|
||||
if vim.trim(message) ~= "" then
|
||||
fidget.notify(message, severity)
|
||||
end
|
||||
end
|
||||
else
|
||||
fidget.notify(message, severity)
|
||||
end
|
||||
end,
|
||||
notify_progress = function(message)
|
||||
local progress = require("fidget.progress")
|
||||
|
||||
if progress_handle then
|
||||
progress_handle.title = ""
|
||||
progress_handle.message = message
|
||||
else
|
||||
progress_handle = progress.handle.create({
|
||||
message = message,
|
||||
lsp_client = { name = "xcodebuild.nvim" },
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
code_coverage = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>X", "<cmd>XcodebuildPicker<cr>", desc = "Show Xcodebuild Actions" },
|
||||
{ "<leader>xf", "<cmd>XcodebuildProjectManager<cr>", desc = "Show Project Manager Actions" },
|
||||
{ "<leader>xb", "<cmd>XcodebuildBuild<cr>", desc = "Build Project" },
|
||||
{ "<leader>xB", "<cmd>XcodebuildBuildForTesting<cr>", desc = "Build For Testing" },
|
||||
{ "<leader>xr", "<cmd>XcodebuildBuildRun<cr>", desc = "Build & Run Project" },
|
||||
{ "<leader>xt", "<cmd>XcodebuildTest<cr>", desc = "Run Tests" },
|
||||
{ "<leader>xt", "<cmd>XcodebuildTestSelected<cr>", desc = "Run Selected Tests" },
|
||||
{ "<leader>xT", "<cmd>XcodebuildTestClass<cr>", desc = "Run This Test Class" },
|
||||
{ "<leader>xl", "<cmd>XcodebuildToggleLogs<cr>", desc = "Toggle Xcodebuild Logs" },
|
||||
{ "<leader>xc", "<cmd>XcodebuildToggleCodeCoverage<cr>", desc = "Toggle Code Coverage" },
|
||||
{ "<leader>xC", "<cmd>XcodebuildShowCodeCoverageReport<cr>", desc = "Show Code Coverage Report" },
|
||||
{ "<leader>xe", "<cmd>XcodebuildTestExplorerToggle<cr>", desc = "Toggle Test Explorer" },
|
||||
{ "<leader>xs", "<cmd>XcodebuildFailingSnapshots<cr>", desc = "Show Failing Snapshots" },
|
||||
{ "<leader>xd", "<cmd>XcodebuildSelectDevice<cr>", desc = "Select Device" },
|
||||
{ "<leader>xp", "<cmd>XcodebuildSelectTestPlan<cr>", desc = "Select Test Plan" },
|
||||
{ "<leader>xq", "<cmd>Telescope quickfix<cr", desc = "Show QuickFix List" },
|
||||
{ "<leader>xx", "<cmd>XcodebuildQuickfixLine<cr>", desc = "Quickfix Line" },
|
||||
{ "<leader>xa", "<cmd>XcodebuildCodeActions<cr>", desc = "Show Code Actions" },
|
||||
},
|
||||
}
|
||||
16
nvim/lazynvim/spell/en.utf-8.add
Executable file
16
nvim/lazynvim/spell/en.utf-8.add
Executable file
@@ -0,0 +1,16 @@
|
||||
MeasureQuick
|
||||
Housh
|
||||
sealtite
|
||||
Subcool
|
||||
OEM
|
||||
NEC
|
||||
AHJ
|
||||
CFM
|
||||
Hydronic
|
||||
subpar
|
||||
quo
|
||||
IAQ
|
||||
wc
|
||||
HVAC
|
||||
dehumidification
|
||||
ansible
|
||||
BIN
nvim/lazynvim/spell/en.utf-8.add.spl
Executable file
BIN
nvim/lazynvim/spell/en.utf-8.add.spl
Executable file
Binary file not shown.
3
nvim/lazynvim/stylua.toml
Normal file
3
nvim/lazynvim/stylua.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
20
nvim/m-housh/after/ftplugin/markdown.lua
Normal file
20
nvim/m-housh/after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- Markdown specific key maps.
|
||||
--
|
||||
local todos = require("todo-comments")
|
||||
local keywords = { "WARN", "WARNING", "IMPORTANT" }
|
||||
|
||||
-- Show all the warnings in the quick fix list.
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>tw",
|
||||
"<CMD>Trouble todo toggle filter = {tag = {WARN, IMPORTANT}}<CR>",
|
||||
{ desc = "[T]odo [W]arnings" }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "]w", function()
|
||||
todos.jump_next({ keywords = keywords })
|
||||
end, { desc = "Next [W]arning" })
|
||||
|
||||
vim.keymap.set("n", "[w", function()
|
||||
todos.jump_prev({ keywords = keywords })
|
||||
end, { desc = "Previous [W]arning" })
|
||||
2
nvim/m-housh/after/ftplugin/swift.lua
Normal file
2
nvim/m-housh/after/ftplugin/swift.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
@@ -2,6 +2,13 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- NOTE: Keep settings at the top, otherwise some options don't work well.
|
||||
-- mainly have had trouble with not using the settings in an `.editorconfig`
|
||||
-- file for projects.
|
||||
|
||||
-- Common settings
|
||||
require("user.settings")
|
||||
|
||||
-- Auto commands
|
||||
require("user.autocmd")
|
||||
|
||||
@@ -13,6 +20,3 @@ require("user.keymaps")
|
||||
|
||||
-- Theme (must stay after plugins are loaded)
|
||||
require("user.theme")
|
||||
|
||||
-- Common settings
|
||||
require("user.settings")
|
||||
|
||||
@@ -39,3 +39,12 @@ vim.api.nvim_exec2(
|
||||
]],
|
||||
{}
|
||||
)
|
||||
|
||||
-- Highlight when yanking.
|
||||
createCmd("TextYankPost", {
|
||||
desc = "Highlight when yanking text.",
|
||||
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -3,19 +3,12 @@ vim.g.maplocalleader = " "
|
||||
|
||||
local keymap = vim.keymap.set
|
||||
local default_options = { noremap = true, silent = true }
|
||||
local telescope = require("telescope.builtin")
|
||||
local wk = require("which-key")
|
||||
|
||||
local wk_add = function(mode, keymaps)
|
||||
wk.add(keymaps, { mode = mode, silent = true })
|
||||
end
|
||||
|
||||
local find_files = function(dir)
|
||||
return function()
|
||||
telescope.find_files({ cwd = dir, hidden = true, no_ignore = true })
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Insert Mode
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -41,20 +34,6 @@ wk_add("n", {
|
||||
{ "J", ":move .+1<CR>==", desc = "Move line down" },
|
||||
{ "K", ":move .-2<CR>==", desc = "Move line up" },
|
||||
|
||||
-- Git
|
||||
{ "<leader>gg", ":LazyGit<CR>", desc = "Open [G]it" },
|
||||
{ "<leader>gf", ":Telescope git_files<CR>", desc = "Find [G]it [F]ile" },
|
||||
{ "<leader>t", ":ToggleTerm<CR>", desc = "Open [T]erminal" },
|
||||
|
||||
-- Telescope keymaps
|
||||
{ "<leader>ff", telescope.find_files, desc = "[F]ind [F]iles" },
|
||||
{ "<leader>fg", telescope.live_grep, desc = "[F]ind [G]rep" },
|
||||
{ "<leader>fb", telescope.buffers, desc = "[F]ind [B]uffers" },
|
||||
{ "<leader>fh", telescope.help_tags, desc = "[F]ind [H]elp" },
|
||||
{ "<leader>fd", find_files("$DOTFILES"), desc = "[F]ind [D]otfiles" },
|
||||
{ "<leader>fn", find_files("$DOTFILES/nvim/m-housh"), desc = "[F]ind [N]vim file" },
|
||||
{ "<leader>fs", find_files("$DOTFILES/scripts/scripts"), desc = "[F]ind [S]cript" },
|
||||
{ "<leader>fz", find_files("$DOTFILES/zsh/config"), desc = "[F]ind [Z]sh config file" },
|
||||
{ "<leader>z", "<CMD>:ZenMode<CR>", desc = "[Z]en Mode" },
|
||||
})
|
||||
|
||||
|
||||
58
nvim/m-housh/lua/user/plugin/blink.lua
Normal file
58
nvim/m-housh/lua/user/plugin/blink.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
enabeld = false,
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
--"L3MON4D3/LuaSnip",
|
||||
},
|
||||
version = "v0.*",
|
||||
opts = {
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
signature = { enabled = true },
|
||||
keymap = {
|
||||
preset = "default",
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
["<C-space>"] = {
|
||||
function(cmp)
|
||||
cmp.show({ providers = { "snippets" } })
|
||||
end,
|
||||
},
|
||||
--["<C-k>"] = { "select_prev", "fallback" },
|
||||
--["<C-j>"] = { "select_next", "fallback" },
|
||||
["<C-n>"] = {
|
||||
function(cmp)
|
||||
if cmp.snippet_active() then
|
||||
return cmp.accept()
|
||||
else
|
||||
return cmp.select_and_accept()
|
||||
end
|
||||
end,
|
||||
"snippet_forward",
|
||||
"fallback",
|
||||
},
|
||||
},
|
||||
-- snippets = {
|
||||
-- expand = function(snippet)
|
||||
-- require("luasnip").lsp_expand(snippet)
|
||||
-- end,
|
||||
-- active = function(filter)
|
||||
-- if filter and filter.direction then
|
||||
-- return require("luasnip").jumpable(filter.direction)
|
||||
-- end
|
||||
-- return require("luasnip").in_snippet()
|
||||
-- end,
|
||||
-- jump = function(direction)
|
||||
-- require("luasnip").jump(direction)
|
||||
-- end,
|
||||
-- },
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
enabled = true,
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||
@@ -32,19 +33,27 @@ return {
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
|
||||
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-Space>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
}), -- select completion, this makes it so it doesn't auto complete when suggesting.
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
["<CR>"] = cmp.mapping({
|
||||
i = function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
else
|
||||
cmp.mapping.confirm({ select = false })
|
||||
fallback()
|
||||
end
|
||||
else
|
||||
cmp.confirm({ select = true })
|
||||
fallback()
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
end,
|
||||
s = cmp.mapping.confirm({ select = true }),
|
||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
}),
|
||||
-- TODO:
|
||||
-- The next two mappings are also implemented in the LuaSnip configuration,
|
||||
-- as <C-j> and <C-k> do they actually need to be here??
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local fidget = require("fidget")
|
||||
fidget.setup({
|
||||
notification = {
|
||||
window = {
|
||||
normal_hl = "String", -- Base highlight group in the notification window
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
border = "rounded", -- Border around the notification window
|
||||
zindex = 45, -- Stacking priority of the notification window
|
||||
max_width = 0, -- Maximum width of the notification window
|
||||
max_height = 0, -- Maximum height of the notification window
|
||||
x_padding = 1, -- Padding from right edge of window boundary
|
||||
y_padding = 1, -- Padding from bottom edge of window boundary
|
||||
align = "bottom", -- How to align the notification window
|
||||
relative = "editor", -- What the notification window position is relative to
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
"j-hui/fidget.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local fidget = require("fidget")
|
||||
fidget.setup({
|
||||
notification = {
|
||||
window = {
|
||||
normal_hl = "String", -- Base highlight group in the notification window
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
border = "rounded", -- Border around the notification window
|
||||
zindex = 45, -- Stacking priority of the notification window
|
||||
max_width = 0, -- Maximum width of the notification window
|
||||
max_height = 0, -- Maximum height of the notification window
|
||||
x_padding = 1, -- Padding from right edge of window boundary
|
||||
y_padding = 1, -- Padding from bottom edge of window boundary
|
||||
align = "bottom", -- How to align the notification window
|
||||
relative = "editor", -- What the notification window position is relative to
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ return {
|
||||
"--stdin-filepath",
|
||||
util.escape_path(util.get_current_buffer_file_path()),
|
||||
"--print-width",
|
||||
"80",
|
||||
"100",
|
||||
"--prose-wrap",
|
||||
"always",
|
||||
"--parser",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
return {
|
||||
"ray-x/go.nvim",
|
||||
enabled = false,
|
||||
lazy = true,
|
||||
dependencies = { -- optional packages
|
||||
"ray-x/guihua.lua",
|
||||
|
||||
@@ -1,85 +1,86 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup({
|
||||
settings = {
|
||||
save_on_toggle = true,
|
||||
sync_on_ui_close = true,
|
||||
key = function()
|
||||
return vim.loop.cwd()
|
||||
end,
|
||||
},
|
||||
})
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup({
|
||||
settings = {
|
||||
save_on_toggle = true,
|
||||
sync_on_ui_close = true,
|
||||
key = function()
|
||||
return vim.loop.cwd()
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
local conf = require("telescope.config").values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
local conf = require("telescope.config").values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
require("telescope.pickers")
|
||||
.new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = file_paths,
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
})
|
||||
:find()
|
||||
end
|
||||
require("telescope.pickers")
|
||||
.new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = file_paths,
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<C-e>", function()
|
||||
toggle_telescope(harpoon:list())
|
||||
end, { desc = "Open Harpoon window" })
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<C-e>", function()
|
||||
toggle_telescope(harpoon:list())
|
||||
end, { desc = "Open Harpoon window" })
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function()
|
||||
harpoon:list():add()
|
||||
end, { desc = "[A]dd to harpoon list." })
|
||||
vim.keymap.set("n", "<C-e>", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end, { desc = "Toggle quick menu." })
|
||||
vim.keymap.set("n", "<leader>a", function()
|
||||
harpoon:list():add()
|
||||
end, { desc = "[A]dd to harpoon list." })
|
||||
vim.keymap.set("n", "<C-e>", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end, { desc = "Toggle quick menu." })
|
||||
|
||||
-- Buffer key maps. Currently keeping all buffer movements
|
||||
-- isolated to top left row of keys on keyboard and all begin
|
||||
-- with the <Control> key.
|
||||
-- Buffer key maps. Currently keeping all buffer movements
|
||||
-- isolated to top left row of keys on keyboard and all begin
|
||||
-- with the <Control> key.
|
||||
|
||||
-- Select buffer numbers.
|
||||
vim.keymap.set("n", "<A-y>", function()
|
||||
harpoon:list():select(1)
|
||||
end, { desc = "Select first harpoon buffer." })
|
||||
vim.keymap.set("n", "<A-u>", function()
|
||||
harpoon:list():select(2)
|
||||
end, { desc = "Select second harpoon buffer." })
|
||||
vim.keymap.set("n", "<A-i>", function()
|
||||
harpoon:list():select(3)
|
||||
end, { desc = "Select third harpoon buffer." })
|
||||
vim.keymap.set("n", "<A-o>", function()
|
||||
harpoon:list():select(4)
|
||||
end, { desc = "Select fourth harpoon buffer." })
|
||||
-- Select buffer numbers.
|
||||
vim.keymap.set("n", "<A-y>", function()
|
||||
harpoon:list():select(1)
|
||||
end, { desc = "Select first harpoon buffer." })
|
||||
vim.keymap.set("n", "<A-u>", function()
|
||||
harpoon:list():select(2)
|
||||
end, { desc = "Select second harpoon buffer." })
|
||||
vim.keymap.set("n", "<A-i>", function()
|
||||
harpoon:list():select(3)
|
||||
end, { desc = "Select third harpoon buffer." })
|
||||
vim.keymap.set("n", "<A-o>", function()
|
||||
harpoon:list():select(4)
|
||||
end, { desc = "Select fourth harpoon buffer." })
|
||||
|
||||
-- Toggle previous and next buffers.
|
||||
vim.keymap.set("n", "<C-[>", function()
|
||||
harpoon:list():prev()
|
||||
end, { desc = "[P]revious harpoon buffer." })
|
||||
vim.keymap.set("n", "<C-]>", function()
|
||||
harpoon:list():next()
|
||||
end, { desc = "[N]ext harpoon buffer." })
|
||||
-- Toggle previous and next buffers.
|
||||
vim.keymap.set("n", "<C-[>", function()
|
||||
harpoon:list():prev()
|
||||
end, { desc = "[P]revious harpoon buffer." })
|
||||
vim.keymap.set("n", "<C-]>", function()
|
||||
harpoon:list():next()
|
||||
end, { desc = "[N]ext harpoon buffer." })
|
||||
|
||||
-- Extensions
|
||||
harpoon:extend({
|
||||
UI_CREATE = function(cx)
|
||||
vim.keymap.set("n", "<C-v>", function()
|
||||
harpoon.ui:select_menu_item({ vsplit = true })
|
||||
end, { buffer = cx.buffer, desc = "Open in [V]split" })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
-- Extensions
|
||||
harpoon:extend({
|
||||
UI_CREATE = function(cx)
|
||||
vim.keymap.set("n", "<C-v>", function()
|
||||
harpoon.ui:select_menu_item({ vsplit = true })
|
||||
end, { buffer = cx.buffer, desc = "Open in [V]split" })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
return {
|
||||
"kdheepak/lazygit.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("lazygit")
|
||||
end,
|
||||
}
|
||||
return {}
|
||||
-- return {
|
||||
-- "kdheepak/lazygit.nvim",
|
||||
-- dependencies = {
|
||||
-- "nvim-telescope/telescope.nvim",
|
||||
-- "nvim-lua/plenary.nvim"
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require("telescope").load_extension("lazygit")
|
||||
-- end,
|
||||
-- }
|
||||
|
||||
@@ -15,10 +15,20 @@ return {
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
-- "hrsh7th/cmp-nvim-lsp",
|
||||
"saghen/blink.cmp",
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
opts = {
|
||||
library = {
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
@@ -28,8 +38,9 @@ return {
|
||||
},
|
||||
})
|
||||
local lspconfig = require("lspconfig")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
--local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
--local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
local opts = { noremap = true, silent = true }
|
||||
local on_attach = function(_, bufnr)
|
||||
opts.buffer = bufnr
|
||||
@@ -49,6 +60,9 @@ return {
|
||||
opts.desc = "[G]oto [D]eclaration"
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
|
||||
opts.desc = "[G]oto [R]eferences"
|
||||
vim.keymap.set("n", "gr", "<CMD>Telescope lsp_references<CR>", opts)
|
||||
|
||||
opts.desc = "LSP [C]ode [A]ction"
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local ls = require("luasnip")
|
||||
local types = require("luasnip.util.types")
|
||||
@@ -16,7 +18,7 @@ return {
|
||||
},
|
||||
})
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_lua").lazy_load({ paths = "~/.config/m-housh/lua/user/snippets/" })
|
||||
require("luasnip.loaders.from_lua").lazy_load({ paths = vim.fn.stdpath("config") .. "/snippets" })
|
||||
|
||||
-- Keymaps
|
||||
local opts = { silent = true }
|
||||
|
||||
@@ -31,6 +31,7 @@ end
|
||||
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
--event = "VeryLazy",
|
||||
dependencies = {
|
||||
"wojciech-kulik/xcodebuild.nvim",
|
||||
},
|
||||
|
||||
@@ -1,31 +1,68 @@
|
||||
return {
|
||||
"stevearc/oil.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("oil").setup({
|
||||
columns = { "icon" },
|
||||
keymaps = {
|
||||
["<C-h>"] = false,
|
||||
["<M-h>"] = "actions.select_split",
|
||||
opts = {
|
||||
columns = { "icon" },
|
||||
keymaps = {
|
||||
["<C-h>"] = false,
|
||||
["<M-h>"] = "actions.select_split",
|
||||
["<C-v>"] = {
|
||||
"actions.select",
|
||||
opts = { vertical = true },
|
||||
desc = "Open the entry in a vertical split",
|
||||
},
|
||||
view_options = {
|
||||
is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
|
||||
-- Don't show .DS_Store in output.
|
||||
local is_ds_store = name ~= ".DS_Store"
|
||||
return not is_ds_store
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
},
|
||||
view_options = {
|
||||
is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
|
||||
-- Don't show .DS_Store in output.
|
||||
local is_ds_store = name ~= ".DS_Store"
|
||||
return not is_ds_store
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
-- Show the parent directory in current window.
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory." })
|
||||
|
||||
{ "-", "<CMD>Oil<CR>", desc = "Open directory." },
|
||||
-- Open parent directory in floating window.
|
||||
vim.keymap.set("n", "<space>-", require("oil").toggle_float)
|
||||
|
||||
-- Old habits die hard, map what used to toggle neo-tree to just open a float.
|
||||
vim.keymap.set("n", "<C-n>", require("oil").toggle_float)
|
||||
end,
|
||||
{
|
||||
"<leader>-",
|
||||
function()
|
||||
require("oil").toggle_float()
|
||||
end,
|
||||
desc = "Open directory in float.",
|
||||
},
|
||||
},
|
||||
-- config = function()
|
||||
-- require("oil").setup({
|
||||
-- columns = { "icon" },
|
||||
-- keymaps = {
|
||||
-- ["<C-h>"] = false,
|
||||
-- ["<M-h>"] = "actions.select_split",
|
||||
-- ["<C-v>"] = {
|
||||
-- "actions.select",
|
||||
-- opts = { vertical = true },
|
||||
-- desc = "Open the entry in a vertical split",
|
||||
-- },
|
||||
-- },
|
||||
-- view_options = {
|
||||
-- is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
|
||||
-- -- Don't show .DS_Store in output.
|
||||
-- local is_ds_store = name ~= ".DS_Store"
|
||||
-- return not is_ds_store
|
||||
-- end,
|
||||
-- },
|
||||
-- })
|
||||
--
|
||||
-- -- Show the parent directory in current window.
|
||||
-- vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory." })
|
||||
--
|
||||
-- -- Open parent directory in floating window.
|
||||
-- vim.keymap.set("n", "<space>-", require("oil").toggle_float)
|
||||
--
|
||||
-- -- Old habits die hard, map what used to toggle neo-tree to just open a float.
|
||||
-- vim.keymap.set("n", "<C-n>", require("oil").toggle_float)
|
||||
-- end,
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
return {
|
||||
'm-housh/swift.nvim',
|
||||
dependencies = {
|
||||
'akinsho/toggleterm.nvim'
|
||||
},
|
||||
ft = { 'swift' },
|
||||
config = function()
|
||||
require('swift').setup()
|
||||
local default_options = { noremap = true, silent = true }
|
||||
local actions = require('swift.actions')
|
||||
|
||||
vim.keymap.set('n', '<C-b>', actions.build, default_options)
|
||||
vim.keymap.set('n', '<C-S-U>', actions.test, default_options)
|
||||
end
|
||||
}
|
||||
"m-housh/swift.nvim",
|
||||
dependencies = {
|
||||
"akinsho/toggleterm.nvim",
|
||||
},
|
||||
ft = { "swift" },
|
||||
config = function()
|
||||
require("swift").setup()
|
||||
local default_options = { noremap = true, silent = true }
|
||||
local actions = require("swift.actions")
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.keymap.set("n", "<C-b>", actions.build, default_options)
|
||||
vim.keymap.set("n", "<C-S-U>", actions.test, default_options)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -77,6 +77,26 @@ return {
|
||||
},
|
||||
})
|
||||
|
||||
local map = function(keys, action, desc)
|
||||
local opts = { silent = true, noremap = true, desc = desc }
|
||||
vim.keymap.set("n", keys, action, opts)
|
||||
end
|
||||
|
||||
local find_files = function(dir)
|
||||
return function()
|
||||
builtin.find_files({ cwd = dir, hidden = true, no_ignore = true })
|
||||
end
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<C-A-j>", builtin.jumplist, { silent = true, noremap = true, desc = "Open [J]ump List." })
|
||||
map("<leader>ff", builtin.find_files, "[F]ind [F]iles")
|
||||
map("<leader>fg", builtin.live_grep, "[F]ind [G]rep")
|
||||
map("<leader>fb", builtin.buffers, "[F]ind [B]uffers")
|
||||
map("<leader>fh", builtin.help_tags, "[F]ind [H]elp")
|
||||
map("<leader>fd", find_files("$DOTFILES"), "[F]ind [D]otfiles")
|
||||
map("<leader>fn", find_files("$DOTFILES/nvim/m-housh"), "[F]ind [N]vim file")
|
||||
map("<leader>fs", find_files("$DOTFILES/scripts/scripts"), "[F]ind [S]cript")
|
||||
map("<leader>fz", find_files("$DOTFILES/zsh/config"), "[F]ind [Z]sh config file")
|
||||
map("<leader>gf", builtin.git_files, "Find [G]it [F]iles")
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = { },
|
||||
config = function()
|
||||
require('todo-comments').setup({})
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim",
|
||||
},
|
||||
opts = {},
|
||||
config = function()
|
||||
local todos = require("todo-comments")
|
||||
|
||||
vim.keymap.set('n', '<leader>tq', '<CMD>TodoQuickFix<CR>',
|
||||
{ desc = "[T]odo [Q]uick fix list." }
|
||||
)
|
||||
vim.keymap.set('n', '<leader><leader>t', '<CMD>TodoTelescope<CR>',
|
||||
{ desc = "[T]odo [Q]uick fix list." }
|
||||
)
|
||||
end,
|
||||
todos.setup({
|
||||
keywords = {
|
||||
-- Adds the important keyword, I primarily use this in markdown
|
||||
-- documents to be able to jump and color appropriately.
|
||||
FIX = { alt = { "IMPORTANT" } },
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>tq", "<CMD>Trouble todo toggle<CR>", { desc = "[T]odo [Q]uick fix list." })
|
||||
vim.keymap.set("n", "<leader><leader>t", "<CMD>TodoTelescope<CR>", { desc = "[T]odo telescope list." })
|
||||
vim.keymap.set("n", "<leader>tl", "<CMD>TodoLocList<CR>", { desc = "[T]odo [L]ocation list." })
|
||||
vim.keymap.set("n", "]t", function()
|
||||
todos.jump_next()
|
||||
end, { desc = "Next [T]odo" })
|
||||
vim.keymap.set("n", "[t", function()
|
||||
todos.jump_prev()
|
||||
end, { desc = "Previous [T]odo" })
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
build = ':TSUpdate',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"cmake",
|
||||
"dockerfile",
|
||||
"go",
|
||||
"hcl",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"latex",
|
||||
"ledger",
|
||||
"llvm",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"python",
|
||||
"swift",
|
||||
"toml",
|
||||
"xml",
|
||||
"yaml"
|
||||
}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ignore_install = {}, -- List of parsers to ignore installing
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = {} -- list of language that will be disabled
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<CR>",
|
||||
scope_incremental = "<CR>",
|
||||
node_incremental = "<TAB>",
|
||||
node_decremental = "<S-TAB>"
|
||||
}
|
||||
},
|
||||
indent = {enable = true},
|
||||
autopairs = {{enable = true}},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
["ib"] = "@block.inner",
|
||||
["ab"] = "@block.outer",
|
||||
["ir"] = "@parameter.inner",
|
||||
["ar"] = "@parameter.outer",
|
||||
["a="] = "@assignment.outer",
|
||||
["i="] = "@assignment.inner",
|
||||
}
|
||||
}
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||
max_file_lines = 2000 -- Do not enable for files with more than specified lines
|
||||
}
|
||||
}
|
||||
end
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"cmake",
|
||||
"dockerfile",
|
||||
"go",
|
||||
"hcl",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"latex",
|
||||
"ledger",
|
||||
"llvm",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"python",
|
||||
"swift",
|
||||
"toml",
|
||||
"xml",
|
||||
"yaml",
|
||||
}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ignore_install = {}, -- List of parsers to ignore installing
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = {}, -- list of language that will be disabled
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<CR>",
|
||||
scope_incremental = "<CR>",
|
||||
node_incremental = "<TAB>",
|
||||
node_decremental = "<S-TAB>",
|
||||
},
|
||||
},
|
||||
indent = { enable = true },
|
||||
autopairs = { { enable = true } },
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
["ib"] = "@block.inner",
|
||||
["ab"] = "@block.outer",
|
||||
["ir"] = "@parameter.inner",
|
||||
["ar"] = "@parameter.outer",
|
||||
["a="] = "@assignment.outer",
|
||||
["i="] = "@assignment.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||
max_file_lines = 2000, -- Do not enable for files with more than specified lines
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ return {
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
keys = {
|
||||
{ "<leader>tt", "<cmd>Trouble quickfix toggle<cr>", { desc = "Open a quickfix" } },
|
||||
{ "<leader>d", "<cmd>Trouble diagnostics toggle<cr>", { desc = "Trouble [D]iagnostics" } },
|
||||
{ "<leader>dq", "<cmd>Trouble quickfix toggle<cr>", { desc = "Trouble [Q]uikfix." } },
|
||||
{ "<leader>dl", "<cmd>Trouble loclist toggle<cr>", { desc = "Trouble [L]ocation list" } },
|
||||
},
|
||||
|
||||
opts = {},
|
||||
|
||||
@@ -1,56 +1,57 @@
|
||||
local progress_handle
|
||||
|
||||
return {
|
||||
"wojciech-kulik/xcodebuild.nvim",
|
||||
--branch = "fix/issue-249",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("xcodebuild").setup({
|
||||
show_build_progress_bar = false,
|
||||
logs = {
|
||||
auto_open_on_success_tests = false,
|
||||
auto_open_on_failed_tests = false,
|
||||
auto_open_on_success_build = false,
|
||||
auto_open_on_failed_build = false,
|
||||
auto_focus = false,
|
||||
auto_close_on_app_launch = true,
|
||||
only_summary = true,
|
||||
notify = function(message, severity)
|
||||
local fidget = require("fidget")
|
||||
if progress_handle then
|
||||
progress_handle.message = message
|
||||
if not message:find("Loading") then
|
||||
progress_handle:finish()
|
||||
progress_handle = nil
|
||||
if vim.trim(message) ~= "" then
|
||||
fidget.notify(message, severity)
|
||||
end
|
||||
end
|
||||
else
|
||||
fidget.notify(message, severity)
|
||||
end
|
||||
end,
|
||||
notify_progress = function(message)
|
||||
local progress = require("fidget.progress")
|
||||
"wojciech-kulik/xcodebuild.nvim",
|
||||
event = "VeryLazy",
|
||||
--branch = "fix/issue-249",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("xcodebuild").setup({
|
||||
show_build_progress_bar = false,
|
||||
logs = {
|
||||
auto_open_on_success_tests = false,
|
||||
auto_open_on_failed_tests = false,
|
||||
auto_open_on_success_build = false,
|
||||
auto_open_on_failed_build = false,
|
||||
auto_focus = false,
|
||||
auto_close_on_app_launch = true,
|
||||
only_summary = true,
|
||||
notify = function(message, severity)
|
||||
local fidget = require("fidget")
|
||||
if progress_handle then
|
||||
progress_handle.message = message
|
||||
if not message:find("Loading") then
|
||||
progress_handle:finish()
|
||||
progress_handle = nil
|
||||
if vim.trim(message) ~= "" then
|
||||
fidget.notify(message, severity)
|
||||
end
|
||||
end
|
||||
else
|
||||
fidget.notify(message, severity)
|
||||
end
|
||||
end,
|
||||
notify_progress = function(message)
|
||||
local progress = require("fidget.progress")
|
||||
|
||||
if progress_handle then
|
||||
progress_handle.title = ""
|
||||
progress_handle.message = message
|
||||
else
|
||||
progress_handle = progress.handle.create({
|
||||
message = message,
|
||||
lsp_client = { name = "xcodebuild.nvim" },
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
code_coverage = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
if progress_handle then
|
||||
progress_handle.title = ""
|
||||
progress_handle.message = message
|
||||
else
|
||||
progress_handle = progress.handle.create({
|
||||
message = message,
|
||||
lsp_client = { name = "xcodebuild.nvim" },
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
code_coverage = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- stylua: ignore start
|
||||
vim.keymap.set("n", "<leader>X", "<cmd>XcodebuildPicker<cr>", { desc = "Show Xcodebuild Actions" })
|
||||
@@ -76,5 +77,5 @@ return {
|
||||
|
||||
vim.keymap.set("n", "<leader>xx", "<cmd>XcodebuildQuickfixLine<cr>", { desc = "Quickfix Line" })
|
||||
vim.keymap.set("n", "<leader>xa", "<cmd>XcodebuildCodeActions<cr>", { desc = "Show Code Actions" })
|
||||
end,
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -28,21 +28,12 @@ require("lazy").setup({
|
||||
"christoomey/vim-tmux-navigator",
|
||||
lazy = false,
|
||||
},
|
||||
-- {
|
||||
-- "NMAC427/guess-indent.nvim",
|
||||
-- opts = { }
|
||||
-- },
|
||||
{ "NoahTheDuke/vim-just", ft = { "just" } },
|
||||
{
|
||||
"chipsenkbeil/distant.nvim",
|
||||
branch = "v0.3",
|
||||
config = function()
|
||||
require("distant"):setup()
|
||||
end,
|
||||
version = "v0.*",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
|
||||
-- LSP, formatting, etc. --
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
}, {
|
||||
checker = {
|
||||
enabled = true,
|
||||
|
||||
@@ -2,7 +2,8 @@ local o = vim.opt
|
||||
local wo = vim.wo
|
||||
local fn = vim.fn
|
||||
|
||||
vim.cmd.set('inccommand=split')
|
||||
vim.cmd.set("inccommand=split")
|
||||
o.filetype = "on"
|
||||
o.updatetime = 500 -- faster completion
|
||||
o.timeoutlen = 800 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
o.ttimeoutlen = 300 -- Time in milliseconds to wait for a key code sequence to complete
|
||||
@@ -33,7 +34,7 @@ o.shiftwidth = 2 -- the number of spaces inserted for each indentation
|
||||
o.tabstop = 2 -- how many columns a tab counts for
|
||||
o.termguicolors = true -- set term gui colors (most terminals support this)
|
||||
o.cursorline = true -- highlight the current line
|
||||
o.scrolloff = 8 -- Minimal number of screen lines to keep above and below the cursor
|
||||
o.scrolloff = 20 -- Minimal number of screen lines to keep above and below the cursor
|
||||
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
|
||||
o.hlsearch = false -- highlight all matches on previous search pattern
|
||||
o.ignorecase = true -- ignore case in search patterns
|
||||
@@ -47,7 +48,7 @@ wo.colorcolumn = "99999"
|
||||
o.wildmode = "full"
|
||||
o.lazyredraw = false -- do not redraw screen while running macros
|
||||
o.grepprg = "rg --hidden --vimgrep --smart-case --"
|
||||
o.completeopt = {"menu", "menuone", "noselect", "noinsert"} -- A comma separated list of options for Insert mode completion
|
||||
o.completeopt = { "menu", "menuone", "noselect", "noinsert" } -- A comma separated list of options for Insert mode completion
|
||||
o.wildignorecase = true -- When set case is ignored when completing file names and directories
|
||||
o.wildignore = [[
|
||||
.git,.hg,.svn
|
||||
@@ -62,4 +63,4 @@ o.wildignore = [[
|
||||
*.swp,.lock,.DS_Store,._*
|
||||
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
|
||||
]]
|
||||
o.viminfo="" -- disable viminfo from copying information from current session, for security.
|
||||
o.viminfo = "" -- disable viminfo from copying information from current session, for security.
|
||||
|
||||
17
nvim/m-housh/snippets/init.lua
Normal file
17
nvim/m-housh/snippets/init.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Setup snippets here.
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local ms = ls.multi_snippet
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local t = ls.text_node
|
||||
|
||||
ls.add_snippets("lua", {
|
||||
s("hello", {
|
||||
t('print("hello '),
|
||||
i(1),
|
||||
t(' world")'),
|
||||
}),
|
||||
})
|
||||
34
nvim/m-housh/snippets/lua.lua
Normal file
34
nvim/m-housh/snippets/lua.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Setup snippets here.
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local ms = ls.multi_snippet
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local t = ls.text_node
|
||||
|
||||
ls.add_snippets("lua", {
|
||||
-- Setup a new snippet file.
|
||||
s("sf", {
|
||||
t({
|
||||
"-- Setup snippets.",
|
||||
'local ls = require("luasnip")',
|
||||
"local s = ls.snippet",
|
||||
"local sn = ls.snippet_node",
|
||||
"local ms = ls.multi_snippet",
|
||||
"local i = ls.insert_node",
|
||||
"local f = ls.function_node",
|
||||
"local c = ls.choice_node",
|
||||
"local t = ls.text_node",
|
||||
"-- Add snippets",
|
||||
}),
|
||||
t('ls.add_snippets("'),
|
||||
i(1, "<file-type>"),
|
||||
t({
|
||||
'", {',
|
||||
"\t-- Define snippets here.",
|
||||
"})",
|
||||
}),
|
||||
}),
|
||||
})
|
||||
131
nvim/m-housh/snippets/swift.lua
Normal file
131
nvim/m-housh/snippets/swift.lua
Normal file
@@ -0,0 +1,131 @@
|
||||
-- Setup snippets.
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local ms = ls.multi_snippet
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local t = ls.text_node
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local rep = require("luasnip.extras").rep
|
||||
-- Add snippets
|
||||
ls.add_snippets("swift", {
|
||||
-- Add a dependency snippet.
|
||||
s({ trig = "@d", desc = "Add a dependency." }, fmt("@Dependency(\\.{}) var {}", { i(1), rep(1) })),
|
||||
|
||||
-- Add a dependency client.
|
||||
s(
|
||||
{
|
||||
trig = "@dc",
|
||||
desc = "Add a dependency client.",
|
||||
},
|
||||
fmt(
|
||||
[[
|
||||
public extension DependencyValues {{
|
||||
var {}: {} {{
|
||||
get {{ self[{}.self] }}
|
||||
set {{ self[{}.self] = newValue }}
|
||||
}}
|
||||
}}
|
||||
|
||||
@DependencyClient
|
||||
public struct {} {{
|
||||
|
||||
// Insert interface here.
|
||||
{}
|
||||
}}
|
||||
|
||||
extension {}: TestDependencyKey {{
|
||||
public static let testValue: {} = Self()
|
||||
}}
|
||||
|
||||
]],
|
||||
{
|
||||
i(1, "<name>"),
|
||||
i(2, "<Dependency>"),
|
||||
rep(2),
|
||||
rep(2),
|
||||
rep(2),
|
||||
i(0),
|
||||
rep(2),
|
||||
rep(2),
|
||||
}
|
||||
)
|
||||
),
|
||||
|
||||
s(
|
||||
{ trig = "str", desc = "Add a struct" },
|
||||
fmt(
|
||||
[[
|
||||
struct {}: {} {{
|
||||
{}
|
||||
}}
|
||||
]],
|
||||
{ i(1, "<Name>"), i(2, "<Protocols>"), i(0) }
|
||||
)
|
||||
),
|
||||
|
||||
-- Decorate a type or function with an @_spi(...)
|
||||
s({ trig = "@_s", desc = "Add spi modifier." }, fmt("@_spi({})", { i(1, "name") })),
|
||||
|
||||
-- Add an @_spi(...) import ...
|
||||
s(
|
||||
{ trig = "@_si", desc = "Import with spi." },
|
||||
fmt(
|
||||
[[
|
||||
@_spi({}) import {}
|
||||
{}
|
||||
]],
|
||||
{ i(1, "name"), i(2, "module"), i(0) }
|
||||
)
|
||||
),
|
||||
|
||||
-- Document a function
|
||||
-- TODO: add dynamic number of prameters.
|
||||
s(
|
||||
{ trig = "docf", desc = "Document a function." },
|
||||
fmt(
|
||||
[[
|
||||
/// {}
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - {}: {}
|
||||
]],
|
||||
{ i(1, "A short description."), i(2, "<param>"), i(3, "Describe the parameter.") }
|
||||
)
|
||||
),
|
||||
|
||||
-- Add a parameter to a documentation string.
|
||||
s(
|
||||
{ trig = "param", desc = "Add a parameter to documentation" },
|
||||
fmt(
|
||||
[[
|
||||
/// - {}: {}
|
||||
]],
|
||||
{ i(1, "<param>"), i(2, "<description>") }
|
||||
)
|
||||
),
|
||||
|
||||
-- Add a withDependencies
|
||||
s(
|
||||
{ trig = "wd", desc = "withDependencies" },
|
||||
fmt(
|
||||
[[
|
||||
withDependencies {{
|
||||
$0.{} = {}
|
||||
}} operation: {{
|
||||
@Dependency(\.{}) var {}
|
||||
{}
|
||||
}}
|
||||
]],
|
||||
{
|
||||
i(1, "<dependency>"),
|
||||
i(2, "<override>"),
|
||||
rep(1),
|
||||
rep(1),
|
||||
i(0),
|
||||
}
|
||||
)
|
||||
),
|
||||
})
|
||||
@@ -9,3 +9,8 @@ CFM
|
||||
Hydronic
|
||||
subpar
|
||||
quo
|
||||
IAQ
|
||||
wc
|
||||
HVAC
|
||||
dehumidification
|
||||
ansible
|
||||
|
||||
Binary file not shown.
@@ -8,9 +8,11 @@ debug="${DEBUG}"
|
||||
|
||||
declare -a paths=()
|
||||
declare chooseOpt=
|
||||
declare -a directory=()
|
||||
|
||||
zparseopts -D -- \
|
||||
{c,-choose}=chooseOpt
|
||||
{c,-choose}=chooseOpt \
|
||||
{d,-directory}:=directory
|
||||
|
||||
#################### Helpers ####################
|
||||
|
||||
@@ -39,9 +41,21 @@ function setup_fuzzy_find_paths() {
|
||||
debug_print "paths: $paths"
|
||||
}
|
||||
|
||||
function create_session() {
|
||||
local selected_name=$1
|
||||
local selected=$2
|
||||
|
||||
tmux new-session -ds "$selected_name" -c "$selected" -n "editor"
|
||||
tmux send-keys -t editor 'n' Enter
|
||||
tmux new-window -d -n "terminal" -c "$selected"
|
||||
tmux new-window -d -n 'files' -c "$selected"
|
||||
tmux send-keys -t files 'yazi' Enter
|
||||
}
|
||||
|
||||
#################### MAIN ####################
|
||||
|
||||
declare choose="${chooseOpt[-1]}"
|
||||
declare selected=
|
||||
|
||||
if [[ -n $choose ]]; then
|
||||
debug_print "Choose from existing."
|
||||
@@ -49,6 +63,14 @@ if [[ -n $choose ]]; then
|
||||
tmux list-sessions -F \#S | gum filter \
|
||||
--placeholder "Pick a session..."
|
||||
)
|
||||
elif [ ${#directory} -gt 0 ]; then
|
||||
debug_print "Using directory option."
|
||||
selected=${directory[-1]}
|
||||
if [ "$selected" = "." ] || [ "$selected" = "" ]; then
|
||||
selected="${PWD}"
|
||||
fi
|
||||
debug_print "Directory: $selected"
|
||||
|
||||
elif [[ "$#" -eq 1 ]]; then
|
||||
debug_print "Using existing session: $1"
|
||||
selected=$1
|
||||
@@ -72,15 +94,19 @@ selected_name=$(basename "$selected" | tr . _)
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||
tmux new-session -s "$selected_name" -c "$selected"
|
||||
exit 0
|
||||
create_session "$selected_name" "$selected"
|
||||
# tmux new-session -s "$selected_name" -c "$selected"
|
||||
# exit 0
|
||||
elif ! tmux has-session -t "$selected_name" 2> /dev/null; then
|
||||
create_session "$selected_name" "$selected"
|
||||
fi
|
||||
|
||||
# Create a session if it doesn't exist.
|
||||
if ! tmux has-session -t "$selected_name" 2> /dev/null; then
|
||||
tmux new-session -ds "$selected_name" -c "$selected" -n "editor" "${EDITOR} ."
|
||||
tmux new-window -d -n "terminal" -c "$selected"
|
||||
fi
|
||||
# if ! tmux has-session -t "$selected_name" 2> /dev/null; then
|
||||
# tmux new-session -ds "$selected_name" -c "$selected" -n "editor"
|
||||
# tmux send-keys -t editor 'n' Enter
|
||||
# tmux new-window -d -n "terminal" -c "$selected"
|
||||
# fi
|
||||
|
||||
[ -z $TMUX ] && tmux attach -t "$selected_name" \
|
||||
|| tmux switch-client -t "$selected_name"
|
||||
|
||||
79
scripts/scripts/vault-gopass-client
Executable file
79
scripts/scripts/vault-gopass-client
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env zsh
|
||||
#
|
||||
# An adapter script to use gopass to store and retrieve passwords for ansible vault.
|
||||
#
|
||||
# When calling from ansible vault it get's passed --vault-id [ID] which is the id
|
||||
# of the secret to retrieve.
|
||||
#
|
||||
|
||||
local secretPath="ansible"
|
||||
|
||||
function usage() {
|
||||
cat <<EOF
|
||||
|
||||
An adapter script that integrates gopass as storage for ansible vault id's.
|
||||
|
||||
To retreive a secret based on the vault id, then pass the '--vault-id' flag with an
|
||||
associated [ID] to look for. (This is generally handled / passed in by the ansible-vault
|
||||
command)
|
||||
|
||||
You can also call this script with the '--set' flag and an [ID] argument
|
||||
to create a new secret for the given id. The default behavior of the
|
||||
set option is to prompt for the secret, you can optionally pass the '--generate'
|
||||
flag to automatically generate a secret. If an [ID] argument is not supplied to
|
||||
the set option then we will prompt for the id to store the secret under.
|
||||
|
||||
Secrets are stored in the default password store at '$secretPath/<ID>'.
|
||||
|
||||
Usage: vault-gopass-client [-s | --set] [-g | --generate] [--vault-id <ID>] [ID]
|
||||
|
||||
-s | --set: Set a new secret for the given ID.
|
||||
-g | --generate: Used with the set option to automatically generate the secret.
|
||||
--vault-id <ID>: Used to retrieve a secret for the given ID.
|
||||
-h | --help: Show this usage message.
|
||||
|
||||
Examples:
|
||||
|
||||
# Automatically generate a secret for the 'foo' id.
|
||||
$ vault-gopass --set --generate foo
|
||||
|
||||
# Retrieve the secret for 'foo' and print it to stdout.
|
||||
$ vault-gopass --vault-id foo
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# parse the passed in options, failing if unrecognized options are given.
|
||||
zparseopts -D -E -F - \
|
||||
g=generateFlag -generate=generateFlag \
|
||||
h=helpFlag -help=helpFlag \
|
||||
s=setFlag -set=setFlag \
|
||||
-vault-id:=vaultId \
|
||||
|| exit 1
|
||||
|
||||
# check for the help flag, show usage and exit.
|
||||
[ ${#helpFlag} = 1 ] && usage && exit 0
|
||||
|
||||
if [ ${#vaultId} = 2 ]; then
|
||||
# we received the vault-id option, so we print the
|
||||
# secret to stdout
|
||||
password=$(gopass show --password "$secretPath/${vaultId[-1]}")
|
||||
echo "$password"
|
||||
exit 0
|
||||
elif [ ${#setFlag} = 1 ]; then
|
||||
|
||||
# Use the first argument as the id, we ask for an id
|
||||
# if not supplied.
|
||||
local id=$1
|
||||
if [ "$id" = "" ]; then
|
||||
read -r id\?"Vault ID: "
|
||||
fi
|
||||
|
||||
# Check for generate flag to automatically generate a password.
|
||||
[ ${#generateFlag} = 1 ] \
|
||||
&& gopass generate "$secretPath/$id" 24 \
|
||||
&& exit 0
|
||||
|
||||
# Insert a password prompting the user to supply it.
|
||||
gopass insert "$secretPath/$id"
|
||||
fi
|
||||
@@ -70,12 +70,13 @@ bind-key -r K kill-pane
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
bind -n M-h previous-window
|
||||
bind -n M-L next-window
|
||||
bind -n M-l next-window
|
||||
bind C-l send-keys 'C-l'
|
||||
|
||||
bind f run-shell "tmux display-popup -E -w 80% -h 80% ${SCRIPTS}/tmux-sessionator"
|
||||
bind-key -r C run-shell -b "${SCRIPTS}/tmux-sessionator ~/.dotfiles"
|
||||
bind S run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch"
|
||||
bind f run-shell "tmux display-popup -E -w 80% -h 80% ~/.local/scripts/tmux-sessionator"
|
||||
bind-key -r C run-shell -b "~/.local/scripts/tmux-sessionator ~/.dotfiles"
|
||||
unbind s
|
||||
bind s run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch"
|
||||
|
||||
# reload new changes
|
||||
bind-key r source-file ~/.config/tmux/tmux.conf\; \display-message "source-file done"
|
||||
@@ -151,6 +152,5 @@ set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
|
||||
set -g window-status-current-format " #I#{?#{!=:#{window_name},Window},: #W,} "
|
||||
set -g window-status-current-style "bg=#{@thm_peach},fg=#{@thm_bg},bold"
|
||||
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
local wezterm = require('wezterm')
|
||||
local wezterm = require("wezterm")
|
||||
local config = {}
|
||||
|
||||
if wezterm.config_builder then
|
||||
config = wezterm.config_builder()
|
||||
config = wezterm.config_builder()
|
||||
end
|
||||
|
||||
--config.color_scheme = 'rose-pine'
|
||||
@@ -12,29 +12,30 @@ end
|
||||
-- background = "#131111"
|
||||
-- }
|
||||
|
||||
config.color_scheme = 'Catppuccin Mocha'
|
||||
|
||||
config.color_scheme = "Catppuccin Mocha"
|
||||
|
||||
-- Font
|
||||
config.font = wezterm.font_with_fallback {
|
||||
'JetBrains Mono',
|
||||
'Inconsolata Nerd Font Mono',
|
||||
}
|
||||
config.font = wezterm.font_with_fallback({
|
||||
"JetBrains Mono",
|
||||
"Inconsolata Nerd Font Mono",
|
||||
})
|
||||
config.font_size = 16.0
|
||||
|
||||
-- Window
|
||||
config.adjust_window_size_when_changing_font_size = false
|
||||
config.enable_scroll_bar = false
|
||||
config.initial_cols = 150
|
||||
config.initial_rows= 80
|
||||
config.initial_rows = 80
|
||||
config.window_padding = {
|
||||
left = 5,
|
||||
right = 5,
|
||||
top = 0,
|
||||
bottom = 0
|
||||
left = 10,
|
||||
right = 5,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
}
|
||||
config.window_close_confirmation = 'NeverPrompt'
|
||||
config.window_close_confirmation = "NeverPrompt"
|
||||
--config.window_decorations = 'TITLE'
|
||||
-- Set higher fps
|
||||
config.max_fps = 120
|
||||
|
||||
-- Tab Bar
|
||||
config.show_tabs_in_tab_bar = true
|
||||
|
||||
193
yazi/theme.toml
Normal file
193
yazi/theme.toml
Normal file
@@ -0,0 +1,193 @@
|
||||
# https://github.com/yazi-rs/flavors.git
|
||||
# Catpuccin - Mocha
|
||||
# : Manager {{{
|
||||
|
||||
[manager]
|
||||
cwd = { fg = "#94e2d5" }
|
||||
|
||||
# Hovered
|
||||
hovered = { reversed = true }
|
||||
preview_hovered = { underline = true }
|
||||
|
||||
# Find
|
||||
find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true }
|
||||
find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true }
|
||||
|
||||
# Marker
|
||||
marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" }
|
||||
marker_cut = { fg = "#f38ba8", bg = "#f38ba8" }
|
||||
marker_marked = { fg = "#94e2d5", bg = "#94e2d5" }
|
||||
marker_selected = { fg = "#f9e2af", bg = "#f9e2af" }
|
||||
|
||||
# Tab
|
||||
tab_active = { reversed = true }
|
||||
tab_inactive = {}
|
||||
tab_width = 1
|
||||
|
||||
# Count
|
||||
count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
|
||||
count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
|
||||
count_selected = { fg = "#1e1e2e", bg = "#f9e2af" }
|
||||
|
||||
# Border
|
||||
border_symbol = "│"
|
||||
border_style = { fg = "#7f849c" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Mode {{{
|
||||
|
||||
[mode]
|
||||
|
||||
normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
|
||||
normal_alt = { fg = "#89b4fa", bg = "#313244" }
|
||||
|
||||
# Select mode
|
||||
select_main = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
|
||||
select_alt = { fg = "#a6e3a1", bg = "#313244" }
|
||||
|
||||
# Unset mode
|
||||
unset_main = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true }
|
||||
unset_alt = { fg = "#f2cdcd", bg = "#313244" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Status bar {{{
|
||||
|
||||
[status]
|
||||
separator_open = ""
|
||||
separator_close = ""
|
||||
|
||||
# Progress
|
||||
progress_label = { fg = "#ffffff", bold = true }
|
||||
progress_normal = { fg = "#89b4fa", bg = "#45475a" }
|
||||
progress_error = { fg = "#f38ba8", bg = "#45475a" }
|
||||
|
||||
# Permissions
|
||||
perm_sep = { fg = "#7f849c" }
|
||||
perm_type = { fg = "#89b4fa" }
|
||||
perm_read = { fg = "#f9e2af" }
|
||||
perm_write = { fg = "#f38ba8" }
|
||||
perm_exec = { fg = "#a6e3a1" }
|
||||
|
||||
# TODO: -- remove these once Yazi 0.4 gets released
|
||||
separator_style = { fg = "#313244", bg = "#313244" }
|
||||
mode_normal = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
|
||||
mode_select = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
|
||||
mode_unset = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true }
|
||||
permissions_t = { fg = "#89b4fa" }
|
||||
permissions_r = { fg = "#f9e2af" }
|
||||
permissions_w = { fg = "#f38ba8" }
|
||||
permissions_x = { fg = "#a6e3a1" }
|
||||
permissions_s = { fg = "#7f849c" }
|
||||
# TODO: remove these once Yazi 0.4 gets released --
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Pick {{{
|
||||
|
||||
[pick]
|
||||
border = { fg = "#89b4fa" }
|
||||
active = { fg = "#f5c2e7", bold = true }
|
||||
inactive = {}
|
||||
|
||||
# TODO: -- remove these once Yazi 0.4 gets released
|
||||
[select]
|
||||
border = { fg = "#89b4fa" }
|
||||
active = { fg = "#f5c2e7", bold = true }
|
||||
inactive = {}
|
||||
# TODO: remove these once Yazi 0.4 gets released --
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Input {{{
|
||||
|
||||
[input]
|
||||
border = { fg = "#89b4fa" }
|
||||
title = {}
|
||||
value = {}
|
||||
selected = { reversed = true }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Completion {{{
|
||||
|
||||
[completion]
|
||||
border = { fg = "#89b4fa" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Tasks {{{
|
||||
|
||||
[tasks]
|
||||
border = { fg = "#89b4fa" }
|
||||
title = {}
|
||||
hovered = { fg = "#f5c2e7", underline = true }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Which {{{
|
||||
|
||||
[which]
|
||||
mask = { bg = "#313244" }
|
||||
cand = { fg = "#94e2d5" }
|
||||
rest = { fg = "#9399b2" }
|
||||
desc = { fg = "#f5c2e7" }
|
||||
separator = " "
|
||||
separator_style = { fg = "#585b70" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Help {{{
|
||||
|
||||
[help]
|
||||
on = { fg = "#94e2d5" }
|
||||
run = { fg = "#f5c2e7" }
|
||||
hovered = { reversed = true, bold = true }
|
||||
footer = { fg = "#313244", bg = "#cdd6f4" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Notify {{{
|
||||
|
||||
[notify]
|
||||
title_info = { fg = "#a6e3a1" }
|
||||
title_warn = { fg = "#f9e2af" }
|
||||
title_error = { fg = "#f38ba8" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : File-specific styles {{{
|
||||
|
||||
[filetype]
|
||||
|
||||
rules = [
|
||||
# Images
|
||||
{ mime = "image/*", fg = "#94e2d5" },
|
||||
|
||||
# Media
|
||||
{ mime = "{audio,video}/*", fg = "#f9e2af" },
|
||||
|
||||
# Archives
|
||||
{ mime = "application/*zip", fg = "#f5c2e7" },
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "#f5c2e7" },
|
||||
|
||||
# Documents
|
||||
{ mime = "application/{pdf,doc,rtf,vnd.*}", fg = "#a6e3a1" },
|
||||
|
||||
# Fallback
|
||||
{ name = "*", fg = "#cdd6f4" },
|
||||
{ name = "*/", fg = "#89b4fa" }
|
||||
]
|
||||
|
||||
# : }}}
|
||||
3
yazi/yazi.toml
Normal file
3
yazi/yazi.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[manager]
|
||||
show_hidden = true
|
||||
show_symlink = true
|
||||
@@ -26,8 +26,8 @@ export GITUSER="m-housh"
|
||||
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||
|
||||
# Directories
|
||||
export ANSIBLE_GEN_DIR="$GHREPOS/ansible/ansible-gen-playbook"
|
||||
export ANSIBLE_LOCAL="$GHREPOS/ansible"
|
||||
export ANSIBLE_LOCAL="$REPOS/ansible"
|
||||
export ANSIBLE_GEN_DIR="$ANSIBLE_LOCAL/ansible-gen-playbook"
|
||||
export ANSIBLE_MACOS_PLAYBOOK_DIR="$HOME/ansible-macos-playbook"
|
||||
export ARCHIVE="/Volumes/Archive"
|
||||
export BUCKET="/Volumes/Bucket"
|
||||
@@ -78,8 +78,8 @@ export VAULT_ADDR="https://vault.housh.dev"
|
||||
|
||||
# Ansible
|
||||
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
export ANSIBLE_VAULT_PASSWORD_FILE="$XDG_DATA_HOME/ansible/.vaultpwd"
|
||||
export DEFAULT_VAULT_PASSWORD_FILE="$XDG_DATA_HOME/ansible/.vaultpwd"
|
||||
export ANSIBLE_VAULT_PASSWORD_FILE="$SCRIPTS/vault-gopass-client"
|
||||
export DEFAULT_VAULT_PASSWORD_FILE="$SCRIPTS/vault-gopass-client"
|
||||
|
||||
# Tmux-Sessionator path.
|
||||
export TMUX_SESSIONATOR_PATH="$HOME:$SCRIPTS:$LOCAL_REPOS:$REPOS:$ANSIBLE_LOCAL:$GHREPOS:$HVACIOTREPOS"
|
||||
|
||||
@@ -73,7 +73,7 @@ fpath_prepend \
|
||||
"$(brew --prefix)/share/zsh/site-functions" \
|
||||
"$(brew --prefix)/share/zsh-completions" \
|
||||
"$ZDOTDIR/completions" \
|
||||
"$HOME/.local/completions" \
|
||||
"$HOME/.local/share/zsh/completions" \
|
||||
"$ZDOTDIR/functions"
|
||||
|
||||
autoload -Uz $fpath[1]/*(.:t)
|
||||
@@ -98,7 +98,7 @@ export HISTFILE=$ZDOTDIR/history
|
||||
setopt autocd
|
||||
|
||||
# NOTE: This may be overriden in local env overrides (typically located in $XDG_DATA_HOME/zsh/env.zsh
|
||||
export CDPATH=".:$GHREPOS:$GHREPOS/ansible:$REPOS/github.com:$DOTFILES:$LOCAL_REPOS:$HOME"
|
||||
export CDPATH=".:$REPOS:$REPOS/ansible:$DOTFILES:$LOCAL_REPOS:$BUCKET:$HOME"
|
||||
|
||||
#------------------------------ options ------------------------------
|
||||
# (see `man zshoptions`)
|
||||
@@ -124,9 +124,6 @@ zsh_add_plugin "zsh-users/zsh-autosuggestions"
|
||||
zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
|
||||
zsh_add_plugin "Aloxaf/fzf-tab"
|
||||
|
||||
# Use fzf in history / search contexts.
|
||||
eval "$(fzf --zsh)"
|
||||
|
||||
#------------------------------ completions ------------------------------
|
||||
# case insensitive path-completion
|
||||
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
|
||||
@@ -186,11 +183,15 @@ alias pf='pass fzf' # fuzzy find a password quickly and copy
|
||||
alias pg='gopass show' # get an attribute of a password file quickly.
|
||||
alias pgc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
|
||||
alias reload='exec zsh -l' # reload the shell, useful when making changes.
|
||||
alias s='swift' # shorthand to access swift commands
|
||||
alias st='swift test' # swift test
|
||||
alias sb='swift build' # swift build
|
||||
alias t='tmux' # access tmux quickly
|
||||
alias tka='tmux kill-server' # kill tmux server and all sessions.
|
||||
alias ts='$SCRIPTS/tmux-sessionator' # create new tmux session, fuzzy finding common locations.
|
||||
alias ts='$SCRIPTS/tmux-sessionator' # create new tmux session, fuzzy finding common locations.
|
||||
alias tss='$SCRIPTS/tmux-sessionator --choose' # attach to an existing tmux session.
|
||||
alias tls='tmux list-sessions' # list tmux sessions
|
||||
alias tks='tmux kill-session -t' # kill tmux session
|
||||
alias temp='cd $(mktemp -d)' # create a temporary directory and move into it.
|
||||
alias vi='nvim' # set vi to open neovim
|
||||
alias newf='"$SCRIPTS"/newx --function' # generate a new shell function
|
||||
@@ -201,6 +202,10 @@ alias nvim-kickstart='NVIM_APPNAME=kickstart nvim' # set neovim to use kickst
|
||||
alias nvim-lazy='NVIM_APPNAME=lazy nvim' # set neovim to use lazy config.
|
||||
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" # set wget history location.
|
||||
|
||||
# NOTE: This needs to stay near the bottom, or it doesn't work properly.
|
||||
# Use fzf in history / search contexts.
|
||||
source <(fzf --zsh)
|
||||
|
||||
#------------------------------ local configs ------------------------------
|
||||
|
||||
# TODO: The .zshrc-local is a legacy location and should be removed once my machines are
|
||||
|
||||
@@ -9,36 +9,9 @@
|
||||
# the current working directory.
|
||||
|
||||
function tns() {
|
||||
|
||||
local session_name=
|
||||
local tmux_dir=
|
||||
|
||||
# parse the session, if based on the directory of the argument passed in.
|
||||
# otherwise use the current directory.
|
||||
[ -n "$1" ] && \
|
||||
session_name=$(basename "$1" | tr . _) && \
|
||||
tmux_dir="$1"
|
||||
|
||||
[ -z "$session_name" ] \
|
||||
&& session_name=$(basename "$PWD" | tr . _) && \
|
||||
tmux_dir="$PWD"
|
||||
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
# check if tmux is not running / attached to a session.
|
||||
# if not, then create a new session.
|
||||
if [ -z $TMUX ] && [ -z $tmux_running ]; then
|
||||
tmux new-session -s "$session_name" -c "$tmux_dir" && return 0
|
||||
local directory=$1
|
||||
if [ -n "$directory" ]; then
|
||||
directory=${PWD}
|
||||
fi
|
||||
|
||||
# create a session if it doesn't exist, in the background, so
|
||||
# that we can switch sessions.
|
||||
if ! tmux has-session -t "$session_name" 2> /dev/null; then
|
||||
tmux new-session -ds "$session_name" -c "$tmux_dir"
|
||||
fi
|
||||
|
||||
# attach to the session or switch if it already exists.
|
||||
[ -z $TMUX ] && \
|
||||
tmux attach -t "$session_name" \
|
||||
|| tmux switch-client -t "$session_name"
|
||||
tmux-sessionator --directory "$directory"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user