[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode ec19a472ec 318/500: Update documentation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode ec19a472ec 318/500: Update documentation |
Date: |
Sat, 29 Jan 2022 08:27:17 -0500 (EST) |
branch: elpa/nix-mode
commit ec19a472ecc3eb6a3d05cfac288f75803697fd21
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Update documentation
---
CHANGELOG.md | 19 +++++++++++++------
README.md | 21 ++++++++++++++++++++-
nix-mode.org | 28 +++++++++++++++++++++-------
3 files changed, 54 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9c0fab1fe..e438be6dc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,21 +1,28 @@
# Changelog
-## master
+## 1.4.0
-### New files
+### Changes
-* create CHANGELOG.md
+* Introduced SMIE indentation mode. It is now the default. The old
+ behavior can be restored by setting ‘nix-indent-function’ to
+ indent-relative.
-### Changes
+* Added the ‘nix-indent-region’ function to indent blocks of Nix
+ expressions. This can be used as a dumb formatter.
-## 2.0
+* Better testing has been added to make sure we handle more cases of
+ Nix indentation style.
+
+## 1.3.0
* Added manual.
+* Create CHANGELOG.md
+
### New files
* nix.el: customization settings for nix installation
-*
## 1.2.1
diff --git a/README.md b/README.md
index 3a61edfcff..449d096742 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,31 @@
[![MELPA
Stable](https://stable.melpa.org/packages/nix-mode-badge.svg)](https://stable.melpa.org/#/nix-mode)
[![Build
Status](https://travis-ci.com/NixOS/nix-mode.svg?branch=master)](https://travis-ci.com/NixOS/nix-mode)
-An emacs major mode for editing nix expressions.
+An emacs major mode for editing nix expressions. There is also a
+manual available at nix-mode.org.
## Submodes
A quick list of what is provided.
+### nix-mode.el
+
+This is the main usage of nix-mode. This provides basic handling of
+.nix files. Syntax highlighting and indentation support using SMIE are
+provided. nix-mode can be used with the following snippet:
+
+~~~
+(require 'nix-mode)
+(add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
+~~~
+
+or with use-package:
+
+~~~
+(use-package nix-mode
+ :mode "\\.nix\\'")
+~~~
+
### nix.el
nix.el contains some miscellaneous tools for Nix developers.
diff --git a/nix-mode.org b/nix-mode.org
index ab33d2d73d..907127878b 100644
--- a/nix-mode.org
+++ b/nix-mode.org
@@ -91,7 +91,13 @@ recommended configuration,
You can also use the traditional require usage, but use-package
provides many useful helpers for our purposes. In the next sections,
-some of the things provided will be explained
+some of the things provided will be explained. This snippet will work
+to set up just nix-mode without use-package:
+
+#+BEGIN_SRC emacs-lisp
+(require 'nix-mode)
+(add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
+#+END_SRC
** Modes
@@ -115,12 +121,15 @@ typing,
M-x customize-variable RET nix-indent-function RET
#+END_SRC
-To set it to the experimental indentation, set this value to the
-function, nix-indent-line. Note that there are major bugs that
-prevents this from becoming the default. Certain kinds of code
-involving lots of hanging indents will be incorrect. But, we welcome
-attempts to improve this experience! Please submit pull requests at
-https://github.com/NixOS/nix-mode/pulls.
+There are three possible values for nix-mode. They are:
+
+- indent-relative
+- smie-indent-line (default)
+- nix-indent-line
+
+Starting in version 1.4.0, SMIE is the default and it works very well
+(kudos to @j-piecuch on GitHub). You can restore the old behavior by
+setting =nix-indent-function= to =indent-relative=.
*** nix-drv-mode
@@ -255,3 +264,8 @@ It is available at
[[https://github.com/shlevy/nix-buffer][shlevy/nix-buffer]].
@travisbhartwell also has some package dealing with Nix. They are
available at
[[https://github.com/travisbhartwell/nix-emacs][travisbhartwell/nix-emacs]].
+** Contributing
+
+Please submit pull requests at https://github.com/NixOS/nix-mode/pulls
+and issues at https://github.com/NixOS/nix-mode/issues. All
+contributions are welcome!
- [nongnu] elpa/nix-mode 53ea839a52 418/500: Replace javascript-mode with js-mode, (continued)
- [nongnu] elpa/nix-mode 53ea839a52 418/500: Replace javascript-mode with js-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aae6f710e0 404/500: Address review comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d27820b040 442/500: Merge pull request #131 from nagy/nix-process-refactor, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5f44621864 474/500: nix-flake: Make the argument bindings more predictable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a18a226ce9 123/500: Add nix-mode tests., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 9e59bcf59e 216/500: Fix read only .drv file issue, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8ab089b251 230/500: Set nix-shell-attribute, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 84ee98019f 271/500: Skip over comments in indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a30e88362a 290/500: Remove line that caused tests to not indent at all in the tests, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 82399e6bc3 305/500: Add missing check for '?' when lexing forward., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ec19a472ec 318/500: Update documentation,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 75b907c767 328/500: Improve indentation of function bodies., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 78c3832e48 333/500: Make smie-setup optional, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 56748ac556 457/500: Merge pull request #136 from bcc32/replace-buffer-contents, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e61ecb95ef 456/500: Merge pull request #137 from bcc32/nix-format-before-save, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0d65c482b2 477/500: nix-flake: Avoid use of flatten-list to support older Emacs versions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 07b6069c78 491/500: nix-flake: Fix an unexpected error in assert, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 14f1bb20b9 487/500: chore: Bump install-nix-action to v14.1, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 00b2b8da57 500/500: Merge pull request #145 from NixOS/dependabot/github_actions/cachix/install-nix-action-16, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1e0709acde 028/500: Fixup indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aee3dea8ec 031/500: Refactor font lock, ELPA Syncer, 2022/01/29