Skip to content

Open the current Neovim workspace or buffer in VSCode

License

Notifications You must be signed in to change notification settings

xlboy/vscode-opener.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vscode-opener.nvim

English | 简体中文

Open current working area, buffers, etc. in VSCode


example.mp4

Features

  • Open the current buffer in VSCode

  • Open all buffers in VSCode

  • Open the current working directory (cwd) in VSCode

Installation

  1. Use lazy
{ "xlboy/vscode-opener.nvim" }

Configuration

The purpose of setup is only to set the configuration

require('vscode-opener').setup({ ... }) -- See below↓for specific configuration parameters

Default configuration:

{
  notify = true, -- Whether or not to give related prompts after opening related content in VSCode
}

How to use

Through shortcut keys

Lazy:

{
  "xlboy/vscode-opener.nvim",
  keys = {
    {
      "<leader>vsw",
      "<cmd>lua require('vscode-opener').open_cwd()<CR>",
      desc = "Open Current Workspace in VSCode",
    },
    {
      "<leader>vsc",
      "<cmd>lua require('vscode-opener').open_current_buf()<CR>",
      desc = "Open Current Buffer in VSCode",
    },
    {
      "<leader>vse",
      "<cmd>lua require('vscode-opener').open_current_buf({ cwd = false })<CR>",
      desc = "Open Current Buffer in VSCode (No CWD)",
    },
    {
      "<leader>vsa",
      "<cmd>lua require('vscode-opener').open_all_bufs()<CR>",
      desc = "Open All Buffers in VSCode",
    },
  },
}

Through the picker

{
  "xlboy/vscode-opener.nvim",
  keys = {
    {
      "<leader>vsc",
      "<cmd>lua require('vscode-opener').open()<CR>",
      desc = "Open VSCode Opener Menu",
    },
  },
}

License

MIT

About

Open the current Neovim workspace or buffer in VSCode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages