8 Commits
5 changed files with 22 additions and 11 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
## 0.7.0
- Add `extensions` setting
## 0.5.0
- Add `useLunrPipeline` feature
- Add `useLunrPipeline` setting
- Improve autoselect/autocomplete logic
- Fix a bug that autocomplete feature does not work
+3 -3
View File
@@ -76,7 +76,7 @@ Since keymaps overlap with `notational-velocity`, follow the menu *Packages > nv
[1]: http://notational.net/
[2]: http://daringfireball.net/projects/markdown/syntax
[3]: https://travis-ci.org/seongjaelee/notational-velocity.svg?branch=master
[4]: https://travis-ci.org/seongjaelee/notational-velocity
[3]: https://travis-ci.org/seongjaelee/nvatom.svg?branch=master
[4]: https://travis-ci.org/seongjaelee/nvatom
[5]: https://cloud.githubusercontent.com/assets/948301/7246990/2e2b4c6e-e7b9-11e4-93b0-57954e011e81.gif
[6]: https://github.com/seongjaelee/notational-velocity/issues/25
[6]: https://github.com/seongjaelee/nvatom/issues/25
+3 -2
View File
@@ -17,7 +17,7 @@ class NotationalVelocityView extends SelectListView
@skipPopulateList = false
@prevCursorPosition = 0
@documentsLoaded = false
@docQuery = new DocQuery(@rootDirectory, {recursive: true})
@docQuery = new DocQuery(@rootDirectory, {recursive: true, extensions: atom.config.get('nvatom.extensions')})
@docQuery.on "ready", () =>
@documentsLoaded = true
@setLoading()
@@ -92,7 +92,8 @@ class NotationalVelocityView extends SelectListView
item = @getSelectedItem()
filePath = null
sanitizedQuery = @getFilterQuery().replace(/\s+$/, '')
calculatedPath = path.join(@rootDirectory, sanitizedQuery + '.md')
extension = if atom.config.get('nvatom.extensions').length then atom.config.get('nvatom.extensions')[0] else '.md'
calculatedPath = path.join(@rootDirectory, sanitizedQuery + extension)
if item?
filePath = item.filePath
else if fs.existsSync(calculatedPath)
+8 -1
View File
@@ -9,6 +9,13 @@ module.exports =
description: 'The directory to archive notes'
type: 'string'
default: path.join(process.env.ATOM_HOME, 'nvatom-notes')
extensions:
title: 'Extensions'
description: 'The first extension will be used for newly created notes.'
type: 'array'
default: ['.md', '.txt']
items:
type: 'string'
enableLunrPipeline:
title: 'Enable Lunr Pipeline'
description: 'Lunr pipeline preprocesses query to make search faster. However, it will skip searching some of stop words such as "an" or "be".'
@@ -60,7 +67,7 @@ module.exports =
return unless paneItem?.isModified?()
uri = paneItem.getURI()
return unless uri.indexOf(@rootDirectory) == 0
return unless fs.isMarkdownExtension(path.extname(uri))
return unless path.extname(uri) in atom.config.get('nvatom.extensions')
paneItem?.save?()
autosaveAll: ->
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "nvatom",
"main": "./lib/notational-velocity",
"version": "0.5.1",
"version": "0.7.1",
"private": true,
"contributors": [
"Seongjae Lee <seongjae@gmail.com>",
@@ -12,15 +12,15 @@
"activationCommands": {
"atom-workspace": "nvatom:toggle"
},
"repository": "https://github.com/seongjaelee/notational-velocity",
"repository": "https://github.com/seongjaelee/nvatom",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
},
"bugs": {
"url": "https://github.com/seongjaelee/notational-velocity/issues"
"url": "https://github.com/seongjaelee/nvatom/issues"
},
"homepage": "https://github.com/seongjaelee/notational-velocity",
"homepage": "https://github.com/seongjaelee/nvatom",
"dependencies": {
"atom-space-pen-views": "^2.0.3",
"chokidar": "^1.0.5",