mirror of
https://github.com/wassname/nvatom.git
synced 2026-09-12 12:40:53 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cee47a8fd7 | ||
|
|
15bf1e741b | ||
|
|
bd19c270b3 |
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
|
## 0.7.0
|
||||||
|
- Add `extensions` setting
|
||||||
|
|
||||||
## 0.5.0
|
## 0.5.0
|
||||||
- Add `useLunrPipeline` feature
|
- Add `useLunrPipeline` setting
|
||||||
- Improve autoselect/autocomplete logic
|
- Improve autoselect/autocomplete logic
|
||||||
- Fix a bug that autocomplete feature does not work
|
- Fix a bug that autocomplete feature does not work
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class NotationalVelocityView extends SelectListView
|
|||||||
@skipPopulateList = false
|
@skipPopulateList = false
|
||||||
@prevCursorPosition = 0
|
@prevCursorPosition = 0
|
||||||
@documentsLoaded = false
|
@documentsLoaded = false
|
||||||
@docQuery = new DocQuery(@rootDirectory, {recursive: true})
|
@docQuery = new DocQuery(@rootDirectory, {recursive: true, extensions: atom.config.get('nvatom.extensions')})
|
||||||
@docQuery.on "ready", () =>
|
@docQuery.on "ready", () =>
|
||||||
@documentsLoaded = true
|
@documentsLoaded = true
|
||||||
@setLoading()
|
@setLoading()
|
||||||
@@ -92,7 +92,8 @@ class NotationalVelocityView extends SelectListView
|
|||||||
item = @getSelectedItem()
|
item = @getSelectedItem()
|
||||||
filePath = null
|
filePath = null
|
||||||
sanitizedQuery = @getFilterQuery().replace(/\s+$/, '')
|
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?
|
if item?
|
||||||
filePath = item.filePath
|
filePath = item.filePath
|
||||||
else if fs.existsSync(calculatedPath)
|
else if fs.existsSync(calculatedPath)
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ module.exports =
|
|||||||
description: 'The directory to archive notes'
|
description: 'The directory to archive notes'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
default: path.join(process.env.ATOM_HOME, 'nvatom-notes')
|
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:
|
enableLunrPipeline:
|
||||||
title: 'Enable Lunr Pipeline'
|
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".'
|
description: 'Lunr pipeline preprocesses query to make search faster. However, it will skip searching some of stop words such as "an" or "be".'
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nvatom",
|
"name": "nvatom",
|
||||||
"main": "./lib/notational-velocity",
|
"main": "./lib/notational-velocity",
|
||||||
"version": "0.6.0",
|
"version": "0.7.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Seongjae Lee <seongjae@gmail.com>",
|
"Seongjae Lee <seongjae@gmail.com>",
|
||||||
|
|||||||
Reference in New Issue
Block a user