Vue NativeVue Native
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
  • Getting Started

    • Introduction
    • Installation
    • Your First App
    • Project Structure
  • Core Concepts

    • Components
    • Styling
    • Navigation
    • Native Modules
    • Native Code Blocks
    • Hot Reload
  • Advanced

    • Error Handling
    • Accessibility
    • TypeScript
    • Performance
    • Shared Element Transitions
    • Testing
    • Security
    • Debugging
    • Teleport
    • Forms and v-model
  • Integration Guides

    • State Management
    • Deep Linking & Universal Links
    • State Persistence
    • Push Notifications
    • Error Reporting & Monitoring
  • Tooling

    • Managed Workflow
    • VS Code Extension
    • Neovim Plugin
  • Building & Releasing

    • Building for Release
    • Deployment & App Store Submission
  • Reference

    • Migration & Upgrade Guide
    • Known Limitations & Platform Differences
    • Troubleshooting

Neovim Plugin

Vue Native provides an official Neovim plugin with LuaSnip snippets, nvim-cmp completions, and custom diagnostics for .vue and .ts files.

Installation

lazy.nvim (recommended)

{
  'thelacanians/vue-native',
  config = function()
    require('vue-native').setup()
  end,
  ft = { 'vue', 'typescript' },
  dependencies = {
    'L3MON4D3/LuaSnip',
    'hrsh7th/nvim-cmp',
  },
}

packer.nvim

use {
  'thelacanians/vue-native',
  config = function()
    require('vue-native').setup()
  end,
  ft = { 'vue', 'typescript' },
  requires = {
    'L3MON4D3/LuaSnip',
    'hrsh7th/nvim-cmp',
  },
}

Manual

git clone https://github.com/thelacanians/vue-native \
  ~/.config/nvim/pack/plugins/start/vue-native

Then add to your init.lua:

require('vue-native').setup()

Configuration

require('vue-native').setup({
  snippets = true,       -- LuaSnip snippets (default: true)
  completions = true,    -- nvim-cmp source (default: true)
  diagnostics = true,    -- vim.diagnostic warnings (default: true)
})

Features

Snippets

Over 70 LuaSnip snippets for components, composables, navigation, and scaffolds. All prefixed with vn-.

Type a prefix and press your LuaSnip expand key (usually <Tab>) to expand. Use <Tab> and <S-Tab> to jump between tabstops. Choice nodes (marked with c()) can be cycled with your configured LuaSnip choice key.

Scaffold snippets:

PrefixOutput
vn-appFull app scaffold with SafeArea, styles, and script setup
vn-screenScreen component with useRoute and createStyleSheet
vn-mainmain.ts entry point with createApp, createRouter, and start()
vn-configvue-native.config.ts with iOS and Android configuration

Component snippets:

PrefixComponent
vn-viewVView
vn-textVText
vn-buttonVButton with onPress
vn-inputVInput with v-model
vn-imageVImage with source and resizeMode
vn-scrollviewVScrollView
vn-listVList with data and renderItem
vn-safeareaVSafeArea
vn-switchVSwitch
vn-sliderVSlider
vn-modalVModal
vn-alertVAlertDialog
vn-actionsheetVActionSheet
vn-webviewVWebView
vn-checkboxVCheckbox
vn-radioVRadio
vn-dropdownVDropdown
vn-videoVVideo

Composable snippets:

PrefixComposable
vn-hapticsuseHaptics
vn-storageuseAsyncStorage
vn-clipboarduseClipboard
vn-animationuseAnimation
vn-httpuseHttp
vn-camerauseCamera
vn-websocketuseWebSocket
vn-databaseuseDatabase

See the full list in the plugin README.

Completions

The plugin registers a custom vue_native source for nvim-cmp. Add it to your cmp sources:

require('cmp').setup({
  sources = {
    { name = 'nvim_lsp' },
    { name = 'luasnip' },
    { name = 'vue_native' },
  },
})

The completion source provides:

  • Component names when typing <V in a template section
  • Component props when typing after a component tag (e.g., <VButton )
  • Composable names when typing use in a script section

Each completion item includes documentation with type information and usage examples.

Diagnostics

The plugin uses vim.diagnostic to show real-time warnings for common Vue Native mistakes:

PatternSeverityMessage
app.mount()ErrorUse app.start() instead
@pressWarningUse :onPress prop binding
v-for in VListWarningUse :data and #item slot
import from 'vue'HintImport from @thelacanians/vue-native-runtime

Diagnostics appear inline and in the diagnostics list (:lua vim.diagnostic.setloclist()).

Requirements

  • Neovim 0.8+
  • LuaSnip — for snippet expansion
  • nvim-cmp — for completion menu
  • Volar — recommended for Vue LSP support

Related

  • VS Code Extension — snippets and diagnostics for VS Code
Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Prev
VS Code Extension