Skip to content

Commit

Permalink
chore: nvim and zsh changes
Browse files Browse the repository at this point in the history
  • Loading branch information
miszo committed Dec 6, 2024
1 parent b2656eb commit b17e6f0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 17 deletions.
9 changes: 5 additions & 4 deletions home/dot_config/exact_nvim/exact_lua/exact_config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ vim.cmd([[au BufNewFile,BufRead *.astro setf astro]])
vim.cmd([[au BufNewFile,BufRead Podfile setf ruby]])

-- Code folding
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
-- vim.cmd([[ set nofoldenable]]) -- Disable folding at startup
vim.opt.foldenable = true
vim.opt.foldenable = false

vim.lsp.set_log_level('off')

vim.g.local_plugins_path = vim.fn.stdpath('config') .. '/lua/local_plugins/'

-- LSP Server to use for Ruby.
-- Set to "solargraph" to use solargraph instead of ruby_lsp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ M.setup = function()
vim.api.nvim_create_user_command('CopyFilePathAbsolute', function()
local path = vim.fn.expand('%:p')
vim.fn.setreg('+', path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
vim.notify(path)
end, { desc = 'Copy the absolute path of the current file to the clipboard' })

vim.api.nvim_create_user_command('CopyFilePathRelative', function()
local path = vim.fn.expand('%:.')
vim.fn.setreg('+', path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
vim.notify(path)
end, { desc = 'Copy the relative path of the current file to the clipboard' })

vim.keymap.set('n', '<leader>cpa', '<cmd>CopyFilePathAbsolute<CR>', { desc = "Copy file's absolute path" })
Expand Down
7 changes: 0 additions & 7 deletions home/dot_config/exact_nvim/exact_lua/exact_plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,4 @@ return {
},
},
},
-- Local plugins
{
dir = '../local-plugins/copy-filepath',
config = function()
require('../local-plugins/copy-filepath').setup()
end,
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return {
{
dir = vim.g.local_plugins_path .. 'copy-filepath',
config = function()
require('local_plugins.copy-filepath').setup()
end,
},
}
5 changes: 5 additions & 0 deletions home/dot_config/exact_private_aerospace/aerospace.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ alt-shift-l = ['join-with right', 'mode main']

# floating windows for apps


[[on-window-detected]]
if.app-id = 'com.apple.finder'
run = 'layout floating'

[[on-window-detected]]
if.app-id = 'com.apple.systempreferences'
run = 'layout floating'
Expand Down
14 changes: 10 additions & 4 deletions home/dot_config/zsh/dot_zsh_aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ alias python="python3"
alias g="git"
alias lg="lazygit"
alias ld="lazydocker"
alias dcu="docker compose up -d"
alias dcb="docker compose build"
alias dcd="docker compose down"
alias dcp="docker compose pull"
alias dcu="docker-compose up -d"
alias dcb="docker-compose build"
alias dcd="docker-compose down"
alias dcp="docker-compose pull"
alias chadd="chezmoi add"
alias chdiff="chezmoi diff"
alias chst="chezmoi status"
alias chcd="chezmoi cd"
alias chup="chezmoi update"
alias chapp="chezmoi apply"

alias npmi="npm install"
alias npmci="npm ci"
Expand Down

0 comments on commit b17e6f0

Please sign in to comment.