diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache new file mode 100644 index 0000000..c737580 --- /dev/null +++ b/.php-cs-fixer.cache @@ -0,0 +1 @@ +{"php":"8.1.16","version":"3.14.4","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"config\/.null-ls_409243_php-cs-fixer-conf.php":"fb71792ed72df5b2976115b4380ef622","config\/.null-ls_800261_php-cs-fixer-conf.php":"1a554594a4eaa31e7bf231c0a93ad00e","config\/.null-ls_450233_php-cs-fixer-conf.php":"1a554594a4eaa31e7bf231c0a93ad00e","config\/.null-ls_536351_php-cs-fixer-conf.php":"5bfcd97c4bfff433fa6da9d289fd7ef9","config\/.null-ls_121074_php-cs-fixer-conf.php":"c116993e570fd1fd0d8e5ff29103a452"}} \ No newline at end of file diff --git a/config/astronvim/lua/user/plugins/init.lua b/config/astronvim/lua/user/plugins/init.lua index 305ce06..280fbca 100644 --- a/config/astronvim/lua/user/plugins/init.lua +++ b/config/astronvim/lua/user/plugins/init.lua @@ -1,5 +1,5 @@ return { - -- ["/nvim-neo-tree/neo-tree.nvim"] = { disable = true }, + ["/nvim-neo-tree/neo-tree.nvim"] = { disable = true }, ["rcarriga/nvim-notify"] = { disable = true }, -- ["catppuccin/nvim"] = { @@ -18,11 +18,11 @@ return { require("user.plugins.project") end, }, - -- ["kyazdani42/nvim-tree.lua"] = { - -- config = function() - -- require("user.plugins.nvim-tree") - -- end, - -- }, + ["kyazdani42/nvim-tree.lua"] = { + config = function() + require("user.plugins.nvim-tree") + end, + }, ["kylechui/nvim-surround"] = { tag = "*", -- Use for stability; omit to use `main` branch for the latest features config = function() diff --git a/config/astronvim/lua/user/plugins/neo-tree.lua b/config/astronvim/lua/user/plugins/neo-tree.lua index 85ec4a0..2bb125e 100644 --- a/config/astronvim/lua/user/plugins/neo-tree.lua +++ b/config/astronvim/lua/user/plugins/neo-tree.lua @@ -23,6 +23,7 @@ return { }, window = { width = 30, + auto_expand_width = true, mappings = { ["<2-LeftMouse>"] = "open_with_window_picker", [""] = "open_with_window_picker", @@ -88,10 +89,10 @@ return { renderers = { file = { { "icon" }, - { "name", use_git_status_colors = true }, + { "name", use_git_status_colors = true }, { "harpoon_index" }, --> This is what actually adds the component in where you want it { "diagnostics" }, - { "git_status", highlight = "NeoTreeDimText" }, + { "git_status", highlight = "NeoTreeDimText" }, }, }, window = { @@ -129,6 +130,8 @@ return { if vim.bo.filetype == "neo-tree" then vim.wo.signcolumn = "auto" end + + vim.cmd("highlight! Cursor blend=100") end, }, { diff --git a/config/astronvim/lua/user/plugins/null-ls.lua b/config/astronvim/lua/user/plugins/null-ls.lua index 5ae67e0..5d0baa3 100644 --- a/config/astronvim/lua/user/plugins/null-ls.lua +++ b/config/astronvim/lua/user/plugins/null-ls.lua @@ -4,6 +4,13 @@ return function(config) null_ls.builtins.formatting.prettierd.with({ disabled_filetypes = { "markdown" }, }), + + null_ls.builtins.formatting.phpcsfixer.with({ + extra_args = { + "--config", + "$HOME/.config/php-cs-fixer-conf.php", + }, + }), } return config end diff --git a/config/git/gitconfig b/config/git/gitconfig new file mode 100644 index 0000000..d56b994 --- /dev/null +++ b/config/git/gitconfig @@ -0,0 +1,7 @@ +[user] + email = ale.navarro.parra@gmail.com + user = Alexander Navarro +[pull] + rebase = false +[init] + defaultBranch = main diff --git a/config/git/gitignore b/config/git/gitignore new file mode 100644 index 0000000..204b891 --- /dev/null +++ b/config/git/gitignore @@ -0,0 +1,6 @@ +# Package manager locks +*.lock + +# PHP Stuff +vendor +.php-cs-fixer.cache diff --git a/config/php-cs-fixer-conf.php b/config/php-cs-fixer-conf.php new file mode 100644 index 0000000..d9bed33 --- /dev/null +++ b/config/php-cs-fixer-conf.php @@ -0,0 +1,5 @@ +setIndent(" "); diff --git a/config/zsh/functions/functions.zsh b/config/zsh/functions/functions.zsh index 0aa32cd..4ed8e46 100644 --- a/config/zsh/functions/functions.zsh +++ b/config/zsh/functions/functions.zsh @@ -1,43 +1,43 @@ # SSH tunnel ssh-tunnel() { - local_port=$1 && shift - remote_port=$1 && shift - server=$1 && shift + local_port=$1 && shift + remote_port=$1 && shift + server=$1 && shift - echo "Starting SSH Tunnel for $server" + echo "Starting SSH Tunnel for $server" - ssh -N -L "$local_port":localhost:"$remote_port" "$server" + ssh -N -L "$local_port":localhost:"$remote_port" "$server" } # quick wordpress in docker dwps() { - image_name="wordpress-development" - container_build_path="$HOME/Private-repos/docker-development-services/wordpress" - original_path="$PWD" + image_name="wordpress-development" + container_build_path="$HOME/Repos/Private/docker-services/wordpress" + original_path="$PWD" - if [[ "$(docker images -q $image_name 2> /dev/null)" == "" ]] ; then - cd "$container_build_path" - docker build --tag "$image_name" . - cd "$original_path" - fi + if [[ "$(docker images -q $image_name 2> /dev/null)" == "" ]] ; then + cd "$container_build_path" + docker build --tag "$image_name" . + cd "$original_path" + fi - docker run -d --rm -p 3000:80 --user 1000:1000 -v "$PWD":/var/www/html --name "$image_name" "$image_name" + docker run -d --rm -p 3000:80 --user 1000:1000 -v "$PWD":/var/www/html --name "$image_name" "$image_name" } ## Create python venv pvenv() { - [[ -n $VIRTAUL_ENV ]] && echo "Virtual enviroment already sourced" && return + [[ -n $VIRTAUL_ENV ]] && echo "Virtual enviroment already sourced" && return - dir=${1:-venv} + dir=${1:-venv} - [[ ! -d $dir ]] && echo "Creating virtual enviroment..." && python -m venv $dir + [[ ! -d $dir ]] && echo "Creating virtual enviroment..." && python -m venv $dir - source "$dir/bin/activate" + source "$dir/bin/activate" } # Print bottlenecks profzsh() { - shell=${1-$SHELL} - ZPROF=true $shell -i -c exit + shell=${1-$SHELL} + ZPROF=true $shell -i -c exit } diff --git a/setup/config b/setup/config index 579b2d7..2cd17af 100755 --- a/setup/config +++ b/setup/config @@ -6,14 +6,15 @@ original_pwd="$(pwd)" cd "$DOTS/config" || exit readarray -t configs < <( - fd -d 1 \ - --exclude "*.old" \ - --exclude "create*" \ - --exclude "tmux" + fd -d 1 \ + --exclude "*.old" \ + --exclude "create*" \ + --exclude "tmux" \ + --exclude "git" ) for dot in "${configs[@]}"; do - symlink "$(pwd)/$dot" "${CONFIG}" + symlink "$(pwd)/$dot" "${CONFIG}" done cd "$original_pwd" || exit