{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nix-mode/pulls/comments/293875571","pull_request_review_id":249994586,"id":293875571,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5Mzg3NTU3MQ==","diff_hunk":"@@ -622,7 +724,17 @@ The hook `nix-mode-hook' is run when Nix mode is started.\n   (setq-local parse-sexp-lookup-properties t)\n \n   ;; Automatic indentation [C-j]\n-  (setq-local indent-line-function nix-indent-function)\n+  (smie-setup nix-smie-grammar 'nix-smie-rules\n+              :forward-token 'nix-smie--forward-token\n+              :backward-token 'nix-smie--backward-token)\n+  (setq-local smie-indent-basic 2)\n+  (setq-local indent-line-function 'smie-indent-line)\n+  (ignore-errors\n+    (setf (car (memq 'smie-indent-exps smie-indent-functions))","path":"nix-mode.el","position":495,"original_position":495,"commit_id":"82399e6bc304922825dd5af74283c0081211414f","original_commit_id":"82399e6bc304922825dd5af74283c0081211414f","user":{"login":"matthewbauer","id":19036,"node_id":"MDQ6VXNlcjE5MDM2","avatar_url":"https://avatars0.githubusercontent.com/u/19036?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewbauer","html_url":"https://github.com/matthewbauer","followers_url":"https://api.github.com/users/matthewbauer/followers","following_url":"https://api.github.com/users/matthewbauer/following{/other_user}","gists_url":"https://api.github.com/users/matthewbauer/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewbauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewbauer/subscriptions","organizations_url":"https://api.github.com/users/matthewbauer/orgs","repos_url":"https://api.github.com/users/matthewbauer/repos","events_url":"https://api.github.com/users/matthewbauer/events{/privacy}","received_events_url":"https://api.github.com/users/matthewbauer/received_events","type":"User","site_admin":false},"body":"Why not just ```(setf 'smie-indent-exps 'nix-smie--indent-exps)```?","created_at":"2019-06-14T16:13:57Z","updated_at":"2019-06-14T16:13:57Z","html_url":"https://github.com/NixOS/nix-mode/pull/79#discussion_r293875571","pull_request_url":"https://api.github.com/repos/NixOS/nix-mode/pulls/79","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nix-mode/pulls/comments/293875571"},"html":{"href":"https://github.com/NixOS/nix-mode/pull/79#discussion_r293875571"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nix-mode/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/NixOS/nix-mode/pulls/79","id":286484679,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg2NDg0Njc5","html_url":"https://github.com/NixOS/nix-mode/pull/79","diff_url":"https://github.com/NixOS/nix-mode/pull/79.diff","patch_url":"https://github.com/NixOS/nix-mode/pull/79.patch","issue_url":"https://api.github.com/repos/NixOS/nix-mode/issues/79","number":79,"state":"open","locked":false,"title":"Use SMIE for indentation","user":{"login":"j-piecuch","id":17250100,"node_id":"MDQ6VXNlcjE3MjUwMTAw","avatar_url":"https://avatars2.githubusercontent.com/u/17250100?v=4","gravatar_id":"","url":"https://api.github.com/users/j-piecuch","html_url":"https://github.com/j-piecuch","followers_url":"https://api.github.com/users/j-piecuch/followers","following_url":"https://api.github.com/users/j-piecuch/following{/other_user}","gists_url":"https://api.github.com/users/j-piecuch/gists{/gist_id}","starred_url":"https://api.github.com/users/j-piecuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-piecuch/subscriptions","organizations_url":"https://api.github.com/users/j-piecuch/orgs","repos_url":"https://api.github.com/users/j-piecuch/repos","events_url":"https://api.github.com/users/j-piecuch/events{/privacy}","received_events_url":"https://api.github.com/users/j-piecuch/received_events","type":"User","site_admin":false},"body":"This is my attempt at providing a sensible indentation function for nix mode.\r\nIt's a bit hacky, but it works (i.e. it barely changes anything when I format something like [this file](https://github.com/NixOS/nixpkgs/blob/master/lib/strings.nix).\r\nLet me know what you think!","created_at":"2019-06-09T17:20:34Z","updated_at":"2019-06-14T16:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5dc630ef8f171ced33e09b5bf7195bb0e7a1a76","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nix-mode/pulls/79/commits","review_comments_url":"https://api.github.com/repos/NixOS/nix-mode/pulls/79/comments","review_comment_url":"https://api.github.com/repos/NixOS/nix-mode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nix-mode/issues/79/comments","statuses_url":"https://api.github.com/repos/NixOS/nix-mode/statuses/82399e6bc304922825dd5af74283c0081211414f","head":{"label":"j-piecuch:smie","ref":"smie","sha":"82399e6bc304922825dd5af74283c0081211414f","user":{"login":"j-piecuch","id":17250100,"node_id":"MDQ6VXNlcjE3MjUwMTAw","avatar_url":"https://avatars2.githubusercontent.com/u/17250100?v=4","gravatar_id":"","url":"https://api.github.com/users/j-piecuch","html_url":"https://github.com/j-piecuch","followers_url":"https://api.github.com/users/j-piecuch/followers","following_url":"https://api.github.com/users/j-piecuch/following{/other_user}","gists_url":"https://api.github.com/users/j-piecuch/gists{/gist_id}","starred_url":"https://api.github.com/users/j-piecuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-piecuch/subscriptions","organizations_url":"https://api.github.com/users/j-piecuch/orgs","repos_url":"https://api.github.com/users/j-piecuch/repos","events_url":"https://api.github.com/users/j-piecuch/events{/privacy}","received_events_url":"https://api.github.com/users/j-piecuch/received_events","type":"User","site_admin":false},"repo":{"id":190774365,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA3NzQzNjU=","name":"nix-mode","full_name":"j-piecuch/nix-mode","private":false,"owner":{"login":"j-piecuch","id":17250100,"node_id":"MDQ6VXNlcjE3MjUwMTAw","avatar_url":"https://avatars2.githubusercontent.com/u/17250100?v=4","gravatar_id":"","url":"https://api.github.com/users/j-piecuch","html_url":"https://github.com/j-piecuch","followers_url":"https://api.github.com/users/j-piecuch/followers","following_url":"https://api.github.com/users/j-piecuch/following{/other_user}","gists_url":"https://api.github.com/users/j-piecuch/gists{/gist_id}","starred_url":"https://api.github.com/users/j-piecuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-piecuch/subscriptions","organizations_url":"https://api.github.com/users/j-piecuch/orgs","repos_url":"https://api.github.com/users/j-piecuch/repos","events_url":"https://api.github.com/users/j-piecuch/events{/privacy}","received_events_url":"https://api.github.com/users/j-piecuch/received_events","type":"User","site_admin":false},"html_url":"https://github.com/j-piecuch/nix-mode","description":"An Emacs major mode for editing Nix expressions.","fork":true,"url":"https://api.github.com/repos/j-piecuch/nix-mode","forks_url":"https://api.github.com/repos/j-piecuch/nix-mode/forks","keys_url":"https://api.github.com/repos/j-piecuch/nix-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/j-piecuch/nix-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/j-piecuch/nix-mode/teams","hooks_url":"https://api.github.com/repos/j-piecuch/nix-mode/hooks","issue_events_url":"https://api.github.com/repos/j-piecuch/nix-mode/issues/events{/number}","events_url":"https://api.github.com/repos/j-piecuch/nix-mode/events","assignees_url":"https://api.github.com/repos/j-piecuch/nix-mode/assignees{/user}","branches_url":"https://api.github.com/repos/j-piecuch/nix-mode/branches{/branch}","tags_url":"https://api.github.com/repos/j-piecuch/nix-mode/tags","blobs_url":"https://api.github.com/repos/j-piecuch/nix-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/j-piecuch/nix-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/j-piecuch/nix-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/j-piecuch/nix-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/j-piecuch/nix-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/j-piecuch/nix-mode/languages","stargazers_url":"https://api.github.com/repos/j-piecuch/nix-mode/stargazers","contributors_url":"https://api.github.com/repos/j-piecuch/nix-mode/contributors","subscribers_url":"https://api.github.com/repos/j-piecuch/nix-mode/subscribers","subscription_url":"https://api.github.com/repos/j-piecuch/nix-mode/subscription","commits_url":"https://api.github.com/repos/j-piecuch/nix-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/j-piecuch/nix-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/j-piecuch/nix-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/j-piecuch/nix-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/j-piecuch/nix-mode/contents/{+path}","compare_url":"https://api.github.com/repos/j-piecuch/nix-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/j-piecuch/nix-mode/merges","archive_url":"https://api.github.com/repos/j-piecuch/nix-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/j-piecuch/nix-mode/downloads","issues_url":"https://api.github.com/repos/j-piecuch/nix-mode/issues{/number}","pulls_url":"https://api.github.com/repos/j-piecuch/nix-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/j-piecuch/nix-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/j-piecuch/nix-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/j-piecuch/nix-mode/labels{/name}","releases_url":"https://api.github.com/repos/j-piecuch/nix-mode/releases{/id}","deployments_url":"https://api.github.com/repos/j-piecuch/nix-mode/deployments","created_at":"2019-06-07T16:16:19Z","updated_at":"2019-06-10T14:19:07Z","pushed_at":"2019-06-14T08:37:57Z","git_url":"git://github.com/j-piecuch/nix-mode.git","ssh_url":"git@github.com:j-piecuch/nix-mode.git","clone_url":"https://github.com/j-piecuch/nix-mode.git","svn_url":"https://github.com/j-piecuch/nix-mode","homepage":"","size":404,"stargazers_count":1,"watchers_count":1,"language":"Emacs Lisp","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"NixOS:master","ref":"master","sha":"1e53bed4d47c526c71113569f592c82845a17784","user":{"login":"NixOS","id":487568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/487568?v=4","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"repo":{"id":65940763,"node_id":"MDEwOlJlcG9zaXRvcnk2NTk0MDc2Mw==","name":"nix-mode","full_name":"NixOS/nix-mode","private":false,"owner":{"login":"NixOS","id":487568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/487568?v=4","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NixOS/nix-mode","description":"An Emacs major mode for editing Nix expressions.","fork":false,"url":"https://api.github.com/repos/NixOS/nix-mode","forks_url":"https://api.github.com/repos/NixOS/nix-mode/forks","keys_url":"https://api.github.com/repos/NixOS/nix-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NixOS/nix-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NixOS/nix-mode/teams","hooks_url":"https://api.github.com/repos/NixOS/nix-mode/hooks","issue_events_url":"https://api.github.com/repos/NixOS/nix-mode/issues/events{/number}","events_url":"https://api.github.com/repos/NixOS/nix-mode/events","assignees_url":"https://api.github.com/repos/NixOS/nix-mode/assignees{/user}","branches_url":"https://api.github.com/repos/NixOS/nix-mode/branches{/branch}","tags_url":"https://api.github.com/repos/NixOS/nix-mode/tags","blobs_url":"https://api.github.com/repos/NixOS/nix-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NixOS/nix-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NixOS/nix-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/NixOS/nix-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NixOS/nix-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/NixOS/nix-mode/languages","stargazers_url":"https://api.github.com/repos/NixOS/nix-mode/stargazers","contributors_url":"https://api.github.com/repos/NixOS/nix-mode/contributors","subscribers_url":"https://api.github.com/repos/NixOS/nix-mode/subscribers","subscription_url":"https://api.github.com/repos/NixOS/nix-mode/subscription","commits_url":"https://api.github.com/repos/NixOS/nix-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/NixOS/nix-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/NixOS/nix-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/NixOS/nix-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/NixOS/nix-mode/contents/{+path}","compare_url":"https://api.github.com/repos/NixOS/nix-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NixOS/nix-mode/merges","archive_url":"https://api.github.com/repos/NixOS/nix-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NixOS/nix-mode/downloads","issues_url":"https://api.github.com/repos/NixOS/nix-mode/issues{/number}","pulls_url":"https://api.github.com/repos/NixOS/nix-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/NixOS/nix-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/NixOS/nix-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NixOS/nix-mode/labels{/name}","releases_url":"https://api.github.com/repos/NixOS/nix-mode/releases{/id}","deployments_url":"https://api.github.com/repos/NixOS/nix-mode/deployments","created_at":"2016-08-17T20:46:39Z","updated_at":"2019-06-09T19:35:51Z","pushed_at":"2019-06-14T08:37:58Z","git_url":"git://github.com/NixOS/nix-mode.git","ssh_url":"git@github.com:NixOS/nix-mode.git","clone_url":"https://github.com/NixOS/nix-mode.git","svn_url":"https://github.com/NixOS/nix-mode","homepage":"","size":372,"stargazers_count":69,"watchers_count":69,"language":"Emacs Lisp","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":17,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":21,"open_issues":17,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nix-mode/pulls/79"},"html":{"href":"https://github.com/NixOS/nix-mode/pull/79"},"issue":{"href":"https://api.github.com/repos/NixOS/nix-mode/issues/79"},"comments":{"href":"https://api.github.com/repos/NixOS/nix-mode/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nix-mode/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nix-mode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nix-mode/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nix-mode/statuses/82399e6bc304922825dd5af74283c0081211414f"}},"author_association":"NONE"}}
{"actor":{"display_login":"matthewbauer"}}