diff --git a/manifests/workstation.pp b/manifests/workstation.pp index a97ebdf..1891063 100644 --- a/manifests/workstation.pp +++ b/manifests/workstation.pp @@ -22,7 +22,6 @@ node default { include core::ssh include core::tmux include core::fonts - include core::vscode include core::emacs include core::terminal include core::mkcert diff --git a/site-modules/core/files/vscode/keybindings.json b/site-modules/core/files/vscode/keybindings.json deleted file mode 100644 index bde950c..0000000 --- a/site-modules/core/files/vscode/keybindings.json +++ /dev/null @@ -1,92 +0,0 @@ -// Place your key bindings in this file to overwrite the defaults -[ - { - "key": "capslock", - "command": "extension.vim_escape", - "when": "editorTextFocus && vim.active && !inDebugRepl" - }, - { - "key": "f2", - "command": "workbench.action.tasks.runTask", - "args": "Build" - }, - { - "key": "f3", - "command": "workbench.action.tasks.runTask", - "args": "Test" - }, - { - "key": "f4", - "command": "workbench.action.tasks.runTask", - "args": "Test File" - }, - - { - "key": "ctrl+h", - "command": "workbench.action.focusNextGroup" - }, - { - "key": "ctrl+k ctrl+right", - "command": "-workbench.action.focusNextGroup" - }, - { - "key": "ctrl+l", - "command": "workbench.action.focusPreviousGroup" - }, - { - "key": "ctrl+k ctrl+left", - "command": "-workbench.action.focusPreviousGroup" - }, - { - "key": "ctrl+o", - "command": "workbench.action.toggleSidebarVisibility" - }, - { - "key": "ctrl+b", - "command": "-workbench.action.toggleSidebarVisibility" - }, - { - "key": "ctrl+k left", - "command": "workbench.action.moveActiveEditorGroupLeft" - }, - { - "key": "ctrl+k left", - "command": "-workbench.action.moveActiveEditorGroupLeft" - }, - { - "key": "ctrl+i", - "command": "workbench.action.quickOpenNavigatePreviousInEditorPicker", - "when": "inEditorsPicker && inQuickOpen" - }, - { - "key": "ctrl+shift+tab", - "command": "-workbench.action.quickOpenNavigatePreviousInEditorPicker", - "when": "inEditorsPicker && inQuickOpen" - }, - { - "key": "ctrl+i", - "command": "workbench.action.openPreviousRecentlyUsedEditorInGroup" - }, - { - "key": "ctrl+shift+tab", - "command": "-workbench.action.openPreviousRecentlyUsedEditorInGroup" - }, - { - "key": "ctrl+i", - "command": "workbench.action.openNextRecentlyUsedEditorInGroup" - }, - { - "key": "ctrl+tab", - "command": "-workbench.action.openNextRecentlyUsedEditorInGroup" - }, - { - "key": "ctrl+i", - "command": "workbench.action.quickOpenNavigateNextInEditorPicker", - "when": "inEditorsPicker && inQuickOpen" - }, - { - "key": "ctrl+tab", - "command": "-workbench.action.quickOpenNavigateNextInEditorPicker", - "when": "inEditorsPicker && inQuickOpen" - } -] diff --git a/site-modules/core/files/vscode/settings.json b/site-modules/core/files/vscode/settings.json deleted file mode 100644 index 8aa1510..0000000 --- a/site-modules/core/files/vscode/settings.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "telemetry.enableTelemetry": false, - // Window - "window.zoomLevel": 1, - "window.menuBarVisibility": "default", - // Workbench - "workbench.sideBar.location": "left", - "workbench.iconTheme": null, - "workbench.activityBar.visible": true, - "workbench.statusBar.visible": true, - "workbench.colorTheme": "Base16 Dark Ocean", - "workbench.panel.location": "right", - // Editor - "editor.tabCompletion": true, - "editor.insertSpaces": true, - "editor.tabSize": 4, - "editor.fontSize": 14, - "editor.fontFamily": "'LigaFreeMono', Hasklig ,'JetBrains Mono', monospace, 'Droid Sans Fallback'", - "editor.minimap.enabled": false, - "editor.lineNumbers": "off", - "editor.rulers": [ - 80, - 120 - ], - "terminal.integrated.fontFamily": "'LigaFreeMono' ,monospace, 'Droid Sans Fallback'", - "terminal.integrated.fontSize": 14, - "php.suggest.basic": false, - "diffEditor.ignoreTrimWhitespace": true, - "files.trimTrailingWhitespace": true, - "vscode-neovim.neovimPath": "/usr/bin/nvim", - // Vim plugin - "vim.autoindent": true, - "vim.easymotionMarkerYOffset": 25, - "vim.hlsearch": true, - "vim.useCtrlKeys": true, - "vim.useSystemClipboard": true, - "vim.visualstar": true, - "vim.insertModeKeyBindings": [ - { - "before": [ - "j", - "j" - ], - "after": [ - "" - ] - } - ], - "files.exclude": { - "**/.git": true, - "**/.vagrant": true, - "**/.svn": true, - "**/.hg": true, - "**/CVS": true, - "**/.DS_Store": true - }, - "search.exclude": { - "**/node_modules": true, - "**/bower_components": true, - "**/vendor": true, - "**/vendor/revo": false, - "**/vendor/adeattwood": false, - "**/runtime": true - }, - "git.enableSmartCommit": false, - "git.confirmSync": false, - "git.autofetch": false, - "phpcs.standard": "~/vscode/ruleset.xml", - "phpcs.showSources": true, - "cSpell.language": "en-GB", - "cSpell.userWords": [ - "Analytics", - "Arobaze", - "Attwood", - "Battledown", - "CKEDITOR", - "Cest", - "Citu", - "Divs", - "Inflector", - "Init's", - "Metas", - "Pjax", - "Polyfill", - "Toggler", - "Unavailabilities", - "Vars", - "Winchcombe", - "aalert", - "adeattwood", - "admin", - "afterbegin", - "afterend", - "autoload", - "beforebegin", - "beforeend", - "behaviors", - "bootbox", - "canceled", - "cardless", - "cleanup", - "codeception", - "codesniffer", - "csrf", - "dont", - "dotfiles", - "edofre", - "endforeach", - "esac", - "filebrowser", - "fullcalendar", - "gitlab", - "httponly", - "inbox", - "incase", - "isdir", - "itemprop", - "jira", - "kartik", - "mkdir", - "multipart", - "nochex", - "nofollow", - "passphrase", - "paypal", - "phpunit", - "placeholder", - "rbac", - "reactstrap", - "readlink", - "revo", - "richtext", - "sagepay", - "sars", - "setuptools", - "sitemap", - "squizlabs", - "titleize", - "todos", - "ukmg", - "unclaim", - "webroot", - "yiisoft" - ], - "extensions.ignoreRecommendations": false, - "gitProjectManager.baseProjectsFolders": [ - "~/development", - "~/sites" - ], - "gitProjectManager.storeRepositoriesBetweenSessions": true, - "gitProjectManager.ignoredFolders": [ - "node-modules", - "vendor" - ], - "gitlens.keymap": "alternate", - "gitlens.gitExplorer.files.layout": "tree", - "gitlens.codeLens.enabled": false, - "gitlens.historyExplorer.enabled": true, - "gitlens.advanced.messages": { - "suppressCommitHasNoPreviousCommitWarning": false, - "suppressCommitNotFoundWarning": false, - "suppressFileNotUnderSourceControlWarning": false, - "suppressGitVersionWarning": false, - "suppressLineUncommittedWarning": false, - "suppressNoRepositoryWarning": false, - "suppressResultsExplorerNotice": false, - "suppressShowKeyBindingsNotice": true, - "suppressUpdateNotice": true, - "suppressWelcomeNotice": true - }, - "cSpell.enabledLanguageIds": [ - "asciidoc", - "c", - "cpp", - "csharp", - "css", - "go", - "handlebars", - "html", - "jade", - "javascript", - "javascriptreact", - "json", - "latex", - "less", - "markdown", - "php", - "plaintext", - "pub", - "puppet", - "python", - "restructuredtext", - "rust", - "scss", - "shellscript", - "text", - "typescript", - "typescriptreact", - "yml" - ], - "[php]": { - "editor.formatOnSave": false - }, - "prettier.singleQuote": true, - "prettier.tabWidth": 4, - "files.associations": { - "Vagrantfile*": "ruby", - "*rc": "shellscript" - }, - "go.formatTool": "goimports", - "editor.fontLigatures": true, - "cSpell.enableFiletypes": [ - "diff", - "dockerfile", - "dotenv", - "erb", - "git-commit", - "helm", - "ini", - "makefile", - "mjml", - "puppetfile", - "ruby", - "toml", - "yaml" - ], - "javascript.updateImportsOnFileMove.enabled": "never", - "dart.flutterSdkPath": "/home/ade/development/flutter", - "C_Cpp.clang_format_sortIncludes": true, - "cmake.configureArgs": [ - "-DCMAKE_TOOLCHAIN_FILE=/home/ade/development/vcpkg/scripts/buildsystems/vcpkg.cmake" - ], - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "vs-kubernetes": { - "vs-kubernetes.knownKubeconfigs": [ - "/home/ade/.kube/zion-config.yaml" - ], - "vs-kubernetes.kubeconfig": "/home/ade/.kube/zion-config.yaml" - }, - "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - } -} \ No newline at end of file diff --git a/site-modules/core/files/vscode/snippets/html.json b/site-modules/core/files/vscode/snippets/html.json deleted file mode 100644 index 3db7ee5..0000000 --- a/site-modules/core/files/vscode/snippets/html.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Php Tag": { - "prefix": "php", - "body": [""], - "description": "Php Tag" - }, - "Php Echo Tag": { - "prefix": "phpe", - "body": [""], - "description": "Php echo tag" - }, - "PHP if": { - "prefix": "phpif", - "body": [ - "", - "\t${0:// Code ....}", - "" - ], - "description": "" - }, - "PHP if else": { - "prefix": "phpife", - "body": [ - "", - "\t${1: // Code....}", - "", - "\t${0:// Code ....}", - "" - ], - "description": "" - }, - "PHP Foreach": { - "prefix": "phpfe", - "body": [ - " ${3:value}) { ?>", - "\t${0: // Code ....}", - "" - ], - "description": "" - } -} diff --git a/site-modules/core/files/vscode/snippets/javascript.json b/site-modules/core/files/vscode/snippets/javascript.json deleted file mode 100644 index 27ccddb..0000000 --- a/site-modules/core/files/vscode/snippets/javascript.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "Create react functional component": { - "prefix": "rfc", - "body": ["export const ${1:Component} = ($2) => {", "\t$0", "};"] - }, - "Create react class component": { - "prefix": "rc", - "body": [ - "export class ${1:Component} extends React.Component {", - "", - "\tstatic propTypes = {", - "\t\t${2}", - "\t};", - "", - "\tconstructor(props) {", - "\t\tsuper(props);$3", - "\t}", - "", - "\trender() {", - "\t\treturn (", - "\t\t\t$0", - "\t\t);", - "\t}", - "", - "}" - ] - }, - "Jest Test": { - "prefix": "test", - "body": ["test('${1:Description}', () => {$0});"], - "description": "Create a jest test" - } -} diff --git a/site-modules/core/files/vscode/snippets/php.json b/site-modules/core/files/vscode/snippets/php.json deleted file mode 100644 index da71585..0000000 --- a/site-modules/core/files/vscode/snippets/php.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "Var Doc": { - "prefix": "var", - "body": ["/** @var ${1:var} ${2:type} ${0:comment} */"], - "description": "Renders a php var doc comment" - }, - "Arrow": { - "prefix": "-", - "body": ["->$0"], - "description": "completes arraw" - }, - "Equals": { - "prefix": "=", - "body": ["=>$0"], - "description": "completes equals" - }, - "This": { - "prefix": "$", - "body": ["\\$this->${0:code}"], - "description": "php this" - }, - "Array Item": { - "prefix": "ai", - "body": ["'${1:key}' => ${0:value},"], - "description": "Creates an array item" - }, - "New": { - "prefix": "new", - "body": ["$${1:var} = new ${2:Class}($0);"] - }, - "Public Function": { - "prefix": "pub", - "body": [ - "public function ${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates public function" - }, - "Protected Function": { - "prefix": "pro", - "body": [ - "protected function ${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates protected function" - }, - "Private Function": { - "prefix": "pri", - "body": [ - "private function ${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates private function" - }, - "Public Static Function": { - "prefix": "pubs", - "body": [ - "public static function ${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates public static function" - }, - "Protected Static Function": { - "prefix": "pros", - "body": [ - "protected static function ${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates protected static function" - }, - "Private Static Function": { - "prefix": "pris", - "body": [ - "private static function ${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates private static function" - }, - "Codeception unit test": { - "prefix": "cutest", - "body": [ - "public function ${1:name}(UnitTester \\$I)", - "{", - "\t${0://code......}", - "}" - ], - "description": "Codeception unit test" - }, - "Codeception functional test": { - "prefix": "cftest", - "body": [ - "public function ${1:name}(FunctionalTester \\$I)", - "{", - "\t${0://code......}", - "}" - ], - "description": "Codeception functional test" - }, - "Codeception acceptance test": { - "prefix": "catest", - "body": [ - "public function ${1:name}(AcceptanceTester \\$I)", - "{", - "\t${0://code......}", - "}" - ], - "description": "Codeception acceptance test" - }, - "DD": { - "prefix": "dd", - "body": ["echo '
' . var_dump($0) . '
';die;"], - "description": "Dump die stright php" - }, - "Dump": { - "prefix": "dump", - "body": ["dump(${0:var});"], - "description": "Dump a var" - }, - "Dump Die": { - "prefix": "dumpd", - "body": ["dump(${0:var});die;"], - "description": "Dump a var" - }, - "Dump Die Revo": { - "prefix": "rdd", - "body": ["\\revo\\Revo::dieVar(${0:var});"], - "description": "Revo die var" - }, - "Yii Action": { - "prefix": "yii-action", - "body": [ - "/**", - " * Undocumented action", - " *", - " * @return yii\\web\\View", - " */", - "public function action${1:name}(${2:$param})", - "{", - "\t${0://code......}", - "}" - ], - "description": "Creates public function" - }, - "Yii2 After Save": { - "prefix": "yii-after-save", - "body": [ - " /**", - " * This method is called at the end of inserting or updating a record.", - " * ", - " * @param bool $insert Whether this method called while inserting or updating a record.", - " * @param array $changedAttributes The old values of attributes that had changed and were saved.", - " * ", - " * @return void", - " */", - " public function afterSave($insert, $changedAttributes)", - " {", - " return parent::afterSave();", - " }" - ], - "description": "Yii2 after save funcion for a activerecord" - }, - "Create Var Doc": { - "prefix": "var-doc", - "body": [ - "echo '
';",
-            "\\$_type = gettype(\\$this) == 'object' ? get_class(\\$this) : gettype(\\$this);",
-            "echo \"/** @var \\\\\\$this \\$_type */\\n\";",
-            "foreach(get_defined_vars() as \\$name => \\$var) {",
-            "    if (substr(\\$name, 0, strlen('_')) !== '_' && \\$name !== 'this') {",
-            "        if (is_array(\\$var) && isset(\\$var[0]) && gettype(\\$var[0]) == 'object') {",
-            "            \\$type = get_class(\\$var[0]);",
-            "            echo \"/** @var \\\\$\\$name {\\$type}[] */\\n\";",
-            "            continue;",
-            "        }",
-            "        \\$type = gettype(\\$var) == 'object' ? get_class(\\$var) : gettype(\\$var);",
-            "        echo \"/** @var \\\\$\\$name \\$type */\\n\";",
-            "    }",
-            "}",
-            "echo \"
\";", - "die;" - ], - "description": "Creates a var doc from the defied vars" - }, - "Create var doc for vscode": { - "prefix": "var-doc-code", - "body": [ - "echo '
';",
-            "echo '/**'.PHP_EOL;",
-            "echo ' *'.PHP_EOL;",
-            "\\$_type = gettype(\\$this) == 'object' ? get_class(\\$this) : gettype(\\$this);",
-            "echo \" * @var \\$_type \\\\\\$this\\n\";",
-            "foreach(get_defined_vars() as \\$name => \\$var) {",
-            "    if (substr(\\$name, 0, strlen('_')) !== '_' && \\$name !== 'this') {",
-            "        if (is_array(\\$var) && isset(\\$var[0]) && gettype(\\$var[0]) == 'object') {",
-            "            \\$type = get_class(\\$var[0]);",
-            "            echo \" * @var {\\$type}[] \\\\$\\$name\\n\";",
-            "            continue;",
-            "        }",
-            "        \\$type = gettype(\\$var) == 'object' ? get_class(\\$var) : gettype(\\$var);",
-            "        echo \" * @var \\$type \\\\$\\$name\\n\";",
-            "    }",
-            "}",
-            "echo ' */'.PHP_EOL;",
-            "echo \"
\";", - "die;" - ], - "description": "Creates a var doc from the defied vars" - }, - "Return Array": { - "prefix": "returna", - "body": ["return [", "\t${0}", "];"], - "description": "" - } -} diff --git a/site-modules/core/manifests/vscode.pp b/site-modules/core/manifests/vscode.pp deleted file mode 100644 index b592b3c..0000000 --- a/site-modules/core/manifests/vscode.pp +++ /dev/null @@ -1,45 +0,0 @@ -class core::vscode { - - file { [ - "${user_home}/.config/Code", - "${user_home}/.config/Code/User", - ]: - ensure => 'directory', - } - - vscode::extention { [ - 'adamwalzer.string-converter', - 'andrsdc.base16-themes', - 'bmewburn.vscode-intelephense-client', - 'christian-kohler.path-intellisense', - 'donjayamanne.githistory', - 'eamodio.gitlens', - 'ikappas.phpcs', - 'jpogran.puppet-vscode', - 'neilbrayfield.php-docblocker', - 'ms-azuretools.vscode-docker', - 'stkb.rewrap', - 'streetsidesoftware.code-spell-checker', - 'uriberman.colonizer', - 'vscodevim.vim', - ]: } - - file { "${user_home}/.config/Code/User/settings.json": - ensure => 'link', - force => true, - target => find_file('core/vscode/settings.json'), - } - - file { "${user_home}/.config/Code/User/keybindings.json": - ensure => 'link', - force => true, - target => find_file('core/vscode/keybindings.json'), - } - - file { "${user_home}/.config/Code/User/snippets": - ensure => 'link', - force => true, - target => find_file('core/vscode/snippets'), - } - -}