mirror of
https://github.com/wassname/nvatom.git
synced 2026-08-15 12:35:35 +08:00
@@ -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)
|
||||
|
||||
@@ -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".'
|
||||
|
||||
Reference in New Issue
Block a user