Skip to content

Commit

Permalink
random
Browse files Browse the repository at this point in the history
  • Loading branch information
mosheavni committed Dec 2, 2024
1 parent 22fd5f9 commit 6daefa2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .config/nvim/lua/plugins/cmpconf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ M.config = function()
check_ts = true, -- treesitter integration
enable_check_bracket_line = false,
disable_in_macro = true,
disable_filetype = { 'TelescopePrompt', 'guihua', 'guihua_rust', 'clap_input' },
disable_filetype = { 'fzf', 'guihua', 'guihua_rust', 'clap_input' },
}
-- If you want insert `(` after select function or method item
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
Expand Down
34 changes: 0 additions & 34 deletions .config/nvim/lua/plugins/functionality.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,40 +160,6 @@ local M = {
})
end,
},
{
'desdic/greyjoy.nvim',
cmd = { 'Greyjoy' },
init = function()
require('user.menu').add_actions('Greyjoy', {
['Run command (:Greyjoy)'] = function()
vim.cmd.Greyjoy()
end,
})
end,
config = function(_, opts)
local greyjoy = require 'greyjoy'
greyjoy.setup(opts)
greyjoy.load_extension 'generic'
greyjoy.load_extension 'makefile'
greyjoy.load_extension 'docker_compose'
end,
opts = {
extensions = {
generic = {
commands = {
['run python {filename}'] = {
command = { 'python3', '{filename}' },
filetype = 'python',
},
['run go {filename}'] = {
command = { 'go', 'run', '{filename}' },
filetype = 'go',
},
},
},
},
},
},
{
'iamcco/markdown-preview.nvim',
build = 'cd app && yarn install',
Expand Down
17 changes: 16 additions & 1 deletion .config/nvim/lua/plugins/look-and-feel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,24 @@ local M = {
require('onedark').load()
end,
},
{
'rose-pine/neovim',
name = 'rose-pine',
opts = {
styles = {
bold = true,
italic = true,
transparency = true,
},
},
config = function(_, opts)
require('rose-pine').setup(opts)
vim.cmd [[colorscheme rose-pine]]
end,
},
{
'sainnhe/sonokai',
enabled = true,
enabled = false,
config = function()
vim.cmd [[
let g:sonokai_style = 'shusia'
Expand Down
10 changes: 10 additions & 0 deletions .config/nvim/lua/user/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ function! ReplaceMotion(motion, text)
endfunction
]]

---Execute a shell command and return its output
---@param cmd table The command to execute as a table where the first element is the command and the rest are arguments
---@param cwd? string The working directory to execute the command in (optional)
---@return table stdout The standard output as a table of lines
---@return number? ret The return code of the command
---@return table stderr The standard error as a table of lines
M.get_os_command_output = function(cmd, cwd)
local Job = require 'plenary.job'
if not cwd then
Expand Down Expand Up @@ -97,6 +103,10 @@ M.country_os_to_emoji = function(iso)
return emoji or ''
end

--- Get the next index in a table after the current element
--- @param tbl table The table to search in
--- @param cur any The current element to find
--- @return number index The next index in the table (loops back to 1)
M.tbl_get_next = function(tbl, cur)
local idx = 1
for i, v in ipairs(tbl) do
Expand Down
4 changes: 4 additions & 0 deletions zsh.d/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ alias tf='terraform'
alias tg='terragrunt'
alias ls='eza '
alias git_current_branch='git branch --show-current'
alias server='python -m http.server 3030'

alias dotfiles='cd ~/Repos/dotfiles'
alias dc='cd '
alias pj='fdf ~/Repos'
alias repos="~/Repos"

# file aliases
alias -s {lua,yml,yaml}=nvim

# global aliases
alias -g Wt='while :;do '
alias -g Wr=' | while read -r line;do echo "=== $line ==="; '
Expand Down

0 comments on commit 6daefa2

Please sign in to comment.