feat(plugins): added snippets
This commit is contained in:
parent
971252838d
commit
c2a823647b
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"name": "custom-snippets",
|
||||||
|
"engines": {
|
||||||
|
"vscode": "^1.11.0"
|
||||||
|
},
|
||||||
|
"contributes": {
|
||||||
|
"snippets": [
|
||||||
|
{
|
||||||
|
"language": [ "xml" ],
|
||||||
|
"path": "./snippets/xml.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
"POM Root": {
|
||||||
|
"prefix": "pomr",
|
||||||
|
"body": [
|
||||||
|
"<project xmlns=\"http://maven.apache.org/POM/4.0.0\"",
|
||||||
|
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
|
||||||
|
" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">",
|
||||||
|
" <modelVersion>4.0.0</modelVersion>",
|
||||||
|
" <groupId>${1:com.example}</groupId>",
|
||||||
|
" <artifactId>${2:my-app}</artifactId>",
|
||||||
|
" <version>${3:1.0-SNAPSHOT}</version>",
|
||||||
|
" <packaging>${4:jar}</packaging>",
|
||||||
|
" <name>${5:My App}</name>",
|
||||||
|
" <description>${6:My application}</description>",
|
||||||
|
" <properties>",
|
||||||
|
" <project.build.sourceEncoding>${7:utf-8}</project.build.sourceEncoding>",
|
||||||
|
" </properties>",
|
||||||
|
"</project>"
|
||||||
|
],
|
||||||
|
"description": "Maven POM Root"
|
||||||
|
},
|
||||||
|
"POM Parent": {
|
||||||
|
"prefix": "pomp",
|
||||||
|
"body": [
|
||||||
|
"<parent>",
|
||||||
|
" <groupId>${1:com.example}</groupId>",
|
||||||
|
" <artifactId>${2:my-parent}</artifactId>",
|
||||||
|
" <version>${3:1.0}</version>",
|
||||||
|
" <relativePath>${4:../pom.xml}</relativePath>",
|
||||||
|
"</parent>"
|
||||||
|
],
|
||||||
|
"description": "Maven POM Parent"
|
||||||
|
},
|
||||||
|
"POM Dependency": {
|
||||||
|
"prefix": "pomd",
|
||||||
|
"body": [
|
||||||
|
"<dependency>",
|
||||||
|
" <groupId>${1:com.example}</groupId>",
|
||||||
|
" <artifactId>${2:my-dependency}</artifactId>",
|
||||||
|
" <version>${3:1.0}</version>",
|
||||||
|
"</dependency>"
|
||||||
|
],
|
||||||
|
"description": "Maven POM Dependency"
|
||||||
|
},
|
||||||
|
"POM Plugin": {
|
||||||
|
"prefix": "poml",
|
||||||
|
"body": [
|
||||||
|
"<plugin>",
|
||||||
|
" <groupId>${1:org.apache.maven.plugins}</groupId>",
|
||||||
|
" <artifactId>${2:maven-${3:plugin}-plugin}</artifactId>",
|
||||||
|
" <version>${4:3.0}</version>",
|
||||||
|
" <!-- <configuration></configuration> -->",
|
||||||
|
" <!-- <executions></executions> -->",
|
||||||
|
"</plugin>"
|
||||||
|
],
|
||||||
|
"description": "Maven POM Plugin"
|
||||||
|
},
|
||||||
|
"POM Plugin Execution": {
|
||||||
|
"prefix": "pomle",
|
||||||
|
"body": [
|
||||||
|
"<execution>",
|
||||||
|
" <id>${1:default-cli}</id>",
|
||||||
|
" <phase>${2:compile}</phase>",
|
||||||
|
" <goals>",
|
||||||
|
" <goal>${3:run}</goal>",
|
||||||
|
" </goals>",
|
||||||
|
" <!-- <configuration></configuration> -->",
|
||||||
|
"</execution>"
|
||||||
|
],
|
||||||
|
"description": "Maven POM Plugin Execution"
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,6 +30,9 @@ local config = {
|
||||||
},
|
},
|
||||||
settings = {
|
settings = {
|
||||||
java = {
|
java = {
|
||||||
|
format = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
maven = {
|
maven = {
|
||||||
downloadSources = true,
|
downloadSources = true,
|
||||||
},
|
},
|
||||||
|
|
9
init.lua
9
init.lua
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed
|
-- Set to true if you have a Nerd Font installed
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
|
@ -619,6 +619,7 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
|
java = { 'google-java-format' },
|
||||||
javascript = { 'prettier' },
|
javascript = { 'prettier' },
|
||||||
typescript = { 'prettier' },
|
typescript = { 'prettier' },
|
||||||
go = { 'gofmt', 'goimports', 'golines', 'gofumpt' },
|
go = { 'gofmt', 'goimports', 'golines', 'gofumpt' },
|
||||||
|
@ -655,9 +656,12 @@ require('lazy').setup({
|
||||||
-- you can use this plugin to help you. It even has snippets
|
-- you can use this plugin to help you. It even has snippets
|
||||||
-- for various frameworks/libraries/etc. but you will have to
|
-- for various frameworks/libraries/etc. but you will have to
|
||||||
-- set up the ones that are useful for you.
|
-- set up the ones that are useful for you.
|
||||||
-- 'rafamadriz/friendly-snippets',
|
'rafamadriz/friendly-snippets',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
require('luasnip.loaders.from_vscode').lazy_load { paths = './custom-snippets/' }
|
||||||
|
|
||||||
-- See `:help cmp`
|
-- See `:help cmp`
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
|
@ -856,7 +860,6 @@ require('lazy').setup({
|
||||||
vim.keymap.set('n', '<C-n>', ':NvimTreeFindFileToggle<CR>')
|
vim.keymap.set('n', '<C-n>', ':NvimTreeFindFileToggle<CR>')
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'nvim-tree/nvim-web-devicons' },
|
|
||||||
{ 'simrat39/symbols-outline.nvim' },
|
{ 'simrat39/symbols-outline.nvim' },
|
||||||
{ 'github/copilot.vim' },
|
{ 'github/copilot.vim' },
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue