generated from anishathalye/dotfiles_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
133 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Use git-sh-setup, similar to git-rebase | ||
# https://www.kernel.org/pub/software/scm/git/docs/git-sh-setup.html | ||
# https://github.com/git/git/blob/master/git-rebase.sh | ||
# shellcheck disable=SC2034 | ||
OPTIONS_STUCKLONG=t | ||
# shellcheck disable=SC2034 | ||
OPTIONS_KEEPDASHDASH= | ||
# shellcheck disable=SC2034 | ||
OPTIONS_SPEC="\ | ||
git open [options] | ||
git open [remote] [branch] | ||
-- | ||
Opens the GitHub page for a repo/branch in your browser. | ||
https://github.com/paulirish/git-open/ | ||
Available options are | ||
c,commit! open current commit | ||
i,issue! open issues page | ||
s,suffix= append this suffix | ||
p,print! just print the url | ||
" | ||
|
||
# https://github.com/koalaman/shellcheck/wiki/SC1090 | ||
# shellcheck source=/dev/null | ||
SUBDIRECTORY_OK='Yes' . "$(git --exec-path)/git-sh-setup" | ||
|
||
echo "ola" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
# Use fzf to move between directories: | ||
cd $(fd -t d -H | fzf --cycle --reverse --color=border:#FFFFFF --preview="tree -L 1 {}" --bind="space:toggle-preview" --preview-window=wrap:hidden) && clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
FILE="$(fd -t f -H | fzf --reverse --preview="head -$LINES {}" --bind="space:toggle-preview" --preview-window=wrap:hidden)" | ||
|
||
if [ -n "$FILE" ]; then | ||
MIME=$(file $FILE --mime-type | head -n1 | sed 's%: % %' | awk '{print $2}') | ||
echo $MIME | ||
if [[ "$MIME" == "text/"* ]]; then | ||
vim "$FILE" | ||
else | ||
open "$FILE" & | ||
disown | ||
exit | ||
fi | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
sync.fisher | ||
sync.nvchad | ||
sync.nvlsp | ||
sync.os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
if type -q fisher; then | ||
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher | ||
fi | ||
|
||
fisher install edc/bass | ||
fisher update |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,73 @@ | ||
local hooks = require("core.hooks") | ||
|
||
hooks.add("setup_mappings", function(map) | ||
-- Keep it centered | ||
map("n", "n", "nzzzv") | ||
map("n", "N", "Nzzzv") | ||
-- Keep it centered | ||
map("n", "n", "nzzzv") | ||
map("n", "N", "Nzzzv") | ||
|
||
-- vim.cmd([[unmap autocmd BufNewFile,BufRead *.h setlocal filetype=c]]) | ||
map("n", "<leader>d", "<cmd>Dirvish %:p:h<cr>") | ||
-- vim.cmd([[unmap autocmd BufNewFile,BufRead *.h setlocal filetype=c]]) | ||
map("n", "<leader>d", "<cmd>Dirvish %:p:h<cr>") | ||
|
||
-- turn off search highlighting | ||
map("n", "<leader><leader>", ":noh <CR>") | ||
-- turn off search highlighting | ||
map("n", "<leader><leader>", ":noh <CR>") | ||
|
||
map("n", "q", "<nop>") | ||
map("n", "q", "<nop>") | ||
|
||
-- Keep selected text under cursor | ||
vim.cmd([[ nnoremap * :let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR> ]]) | ||
-- Keep selected text under cursor | ||
vim.cmd([[ nnoremap * :let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR> ]]) | ||
|
||
map("n", "<leader>ff", ":Telescope find_files <CR>") | ||
map("n", "<leader>p", ":Telescope find_files <CR>") | ||
map("n", "<leader>ff", ":Telescope find_files <CR>") | ||
map("n", "<leader>p", ":Telescope find_files <CR>") | ||
|
||
map("n", "<leader>gg", ":LazyGit<CR>") | ||
map("n", "<leader>fm", "<cmd>lua vim.lsp.buf.formatting()<CR>") | ||
map("n", "<leader>gg", ":LazyGit<CR>") | ||
map("n", "<leader>fm", "<cmd>lua vim.lsp.buf.formatting()<CR>") | ||
|
||
-- vim.cmd("unmap <c-n>") | ||
-- vim.cmd("unmap <c-p>") | ||
-- vim.cmd("unmap <c-n>") | ||
-- vim.cmd("unmap <c-p>") | ||
|
||
-- vim.cmd("unmap <tab>") | ||
-- vim.cmd("unmap <s-tab>") | ||
-- vim.cmd("unmap <tab>") | ||
-- vim.cmd("unmap <s-tab>") | ||
end) | ||
|
||
hooks.add("install_plugins", function(use) | ||
-- use { | ||
-- "max397574/better-escape.nvim", | ||
-- event = "InsertEnter", | ||
-- } | ||
-- use { | ||
-- "max397574/better-escape.nvim", | ||
-- event = "InsertEnter", | ||
-- } | ||
|
||
use({ | ||
"williamboman/nvim-lsp-installer", | ||
config = function() | ||
local lsp_installer = require("nvim-lsp-installer") | ||
use({ | ||
"williamboman/nvim-lsp-installer", | ||
config = function() | ||
local lsp_installer = require("nvim-lsp-installer") | ||
|
||
lsp_installer.on_server_ready(function(server) | ||
local opts = {} | ||
lsp_installer.on_server_ready(function(server) | ||
local opts = {} | ||
|
||
server:setup(opts) | ||
vim.cmd([[ do User LspAttachBuffers ]]) | ||
end) | ||
end, | ||
}) | ||
use({ "justinmk/vim-dirvish", event = "VimEnter" }) | ||
use({ "wincent/scalpel", event = "BufRead" }) | ||
use({ "kdheepak/lazygit.nvim", event = "BufRead" }) | ||
use({ "blankname/vim-fish", event = "BufRead" }) | ||
use({ | ||
"jose-elias-alvarez/null-ls.nvim", | ||
event = "BufRead", | ||
config = function() | ||
require("null-ls").setup({ | ||
sources = { | ||
require("null-ls").builtins.formatting.stylua, | ||
require("null-ls").builtins.formatting.shfmt, | ||
}, | ||
}) | ||
end, | ||
}) | ||
server:setup(opts) | ||
vim.cmd([[ do User LspAttachBuffers ]]) | ||
end) | ||
end, | ||
}) | ||
use({ "justinmk/vim-dirvish", event = "VimEnter" }) | ||
use({ "wincent/scalpel", event = "BufRead" }) | ||
use({ "kdheepak/lazygit.nvim", event = "BufRead" }) | ||
use({ "blankname/vim-fish", event = "BufRead" }) | ||
use({ | ||
"jose-elias-alvarez/null-ls.nvim", | ||
event = "BufRead", | ||
config = function() | ||
require("null-ls").setup({ | ||
sources = { | ||
require("null-ls").builtins.formatting.stylua.with({ | ||
extra_args = { "--indent-width", "4" }, | ||
}), | ||
require("null-ls").builtins.formatting.shfmt.with({ | ||
extra_args = { "-i", "4", "-ci" }, | ||
}), | ||
}, | ||
}) | ||
end, | ||
}) | ||
end) | ||
|
||
vim.cmd([[autocmd BufNewFile,BufRead *.h setlocal filetype=c]]) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters