{"action":"created","issue":{"url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/issues/99","labels_url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/issues/99/comments","events_url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/issues/99/events","html_url":"https://github.com/AndreaCrotti/yasnippet-snippets/pull/99","id":99810257,"number":99,"title":"modernise the scala snippets, close #98","user":{"login":"fommil","id":1914041,"avatar_url":"https://avatars.githubusercontent.com/u/1914041?v=3","gravatar_id":"","url":"https://api.github.com/users/fommil","html_url":"https://github.com/fommil","followers_url":"https://api.github.com/users/fommil/followers","following_url":"https://api.github.com/users/fommil/following{/other_user}","gists_url":"https://api.github.com/users/fommil/gists{/gist_id}","starred_url":"https://api.github.com/users/fommil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fommil/subscriptions","organizations_url":"https://api.github.com/users/fommil/orgs","repos_url":"https://api.github.com/users/fommil/repos","events_url":"https://api.github.com/users/fommil/events{/privacy}","received_events_url":"https://api.github.com/users/fommil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-08T15:55:39Z","updated_at":"2015-08-11T08:52:14Z","closed_at":"2015-08-11T08:51:23Z","pull_request":{"url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/pulls/99","html_url":"https://github.com/AndreaCrotti/yasnippet-snippets/pull/99","diff_url":"https://github.com/AndreaCrotti/yasnippet-snippets/pull/99.diff","patch_url":"https://github.com/AndreaCrotti/yasnippet-snippets/pull/99.patch"},"body":"In https://github.com/ensime/ensime-emacs/ we have dramatically improved the experience of developing Scala code in Emacs. But many of the snippets in this package are interfering with functionality and, as a result, users (myself included) have preferred to turn off yasnippet in scala-mode.\r\n\r\nThis PR performs an audit of the snippets and has identified several classes:\r\n\r\n1. deprecated features (e.g. scala actors, methods without explicit returns) --- removed these\r\n2. encouraging bad code (e.g. runtime instanceof / casting, more relevant for older Scala) --- removed these\r\n3. shortcuts for words that save a few characters --- removed these, as the functionality is much better served by https://github.com/company-mode/company-mode/issues/367 (these are probably the worst offenders)\r\n4. relies on features from an ancient version of `scala-mode` (everybody uses `scala-mode2` now which is much better). This was mostly for scaladoc functionality... if anybody wants this again, please raise a ticket in `ensime-emacs` to make elisp functions available that can be used as drop-in replacements for the old `scala-mode` functions that no longer exist.\r\n\r\nI also tweaked/rewrote a few of the existing snippets to match modern Scala style conventions and syntax.\r\n\r\nThe result is a small set of useful snippets that are relevant for modern scala!\r\n\r\nWe actually have some functionality in `ensime-mode` to generate test classes and so on, I'm wondering if perhaps we should define all that as snippets (CC @edani for thoughts). In which case, expect a PR with those templates added.\r\n\r\nI have a snippet that I run when I create a new scala file, but it relies on an elisp function being present (to extract the username or copyright owner). I'm wondering if that is something that could be contributed also:\r\n\r\n* https://github.com/fommil/dotfiles/blob/master/.emacs.d/init.el\r\n* https://github.com/fommil/dotfiles/tree/master/.emacs.d/snippets/scala-mode"},"comment":{"url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/issues/comments/129775393","html_url":"https://github.com/AndreaCrotti/yasnippet-snippets/pull/99#issuecomment-129775393","issue_url":"https://api.github.com/repos/AndreaCrotti/yasnippet-snippets/issues/99","id":129775393,"user":{"login":"AndreaCrotti","id":53640,"avatar_url":"https://avatars.githubusercontent.com/u/53640?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreaCrotti","html_url":"https://github.com/AndreaCrotti","followers_url":"https://api.github.com/users/AndreaCrotti/followers","following_url":"https://api.github.com/users/AndreaCrotti/following{/other_user}","gists_url":"https://api.github.com/users/AndreaCrotti/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreaCrotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreaCrotti/subscriptions","organizations_url":"https://api.github.com/users/AndreaCrotti/orgs","repos_url":"https://api.github.com/users/AndreaCrotti/repos","events_url":"https://api.github.com/users/AndreaCrotti/events{/privacy}","received_events_url":"https://api.github.com/users/AndreaCrotti/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T08:52:14Z","updated_at":"2015-08-11T08:52:14Z","body":"Ok then it's merged for now, if I find another way to add them and making them available when ensime-mode is disabled even better.."}}