4
4
<a href =" https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets " >
5
5
<img src =" https://github.com/mstuttgart/vscode-odoo-snippets/blob/main/images/icon.png?raw=true " ></a >
6
6
<br >
7
- VSCode Odoo Snippets
7
+ Odoo Snippets
8
8
<br >
9
9
</h1 >
10
10
24
24
<img alt =" Visual Studio Marketplace Rating " src =" https://img.shields.io/visual-studio-marketplace/r/mstuttgart.odoo-snippets?color=875A7B&style=for-the-badge " >
25
25
</a >
26
26
</p >
27
-
27
+ <h4 align =" center " >Works on</h4 >
28
+ <p align =" center " >
29
+ <a href =" https://neovim.io/ " >
30
+ <img alt="Neovim" src="https://img.shields.io/badge/Tools-Neovim-informational?style=for-the-badge&logo=neovim&logoColor=white&color=bed5c5">
31
+ </a >
32
+ <a href =" https://code.visualstudio.com/ " >
33
+ <img alt="VsCode" src="https://img.shields.io/badge/Tools-Vscode-informational?style=for-the-badge&logo=visualstudiocode&logoColor=white&color=bed5c5">
34
+ </a >
35
+ </p >
28
36
29
37
<p align =" center " >
30
38
<a href =" #about " >About</a > |
37
45
38
46
## About
39
47
40
- This extension contains code snippets for [ Odoo] ( https://www.odoo.com ) to help you to develop Odoo modules faster and with no Typing Errors.
48
+ This extension works on [ VsCode ] ( https:// code.visualstudio.com ) and [ Neovim ] ( https://neovim.io/ ) . This add code snippets for [ Odoo] ( https://www.odoo.com ) to help you to develop Odoo modules faster and with no Typing Errors on .
41
49
42
50
All snippets follow the [ OCA Maintainer Guidelines] ( https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md ) and are made to Odoo version ` 12.0 ` +.
43
51
44
-
45
52
## Installation
46
53
54
+ ### VsCode
55
+
47
56
Launch * Quick Open*
48
57
- <img src =" https://www.kernel.org/theme/images/logos/favicon.png " width =16 height =16/ > <a href =" https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf " >Linux</a > ` Ctrl+P `
49
58
- <img src =" https://developer.apple.com/favicon.ico " width =16 height =16/ > <a href =" https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf " >macOS</a > ` ⌘P `
@@ -55,6 +64,46 @@ Paste the following command and press `Enter`:
55
64
ext install mstuttgart.odoo-snippets
56
65
```
57
66
67
+ ### Neovim
68
+
69
+ This collection of snippets should work with any snippet engine that supports loading vscode snippets. Like for example:
70
+
71
+ - [ vim-vsnip] ( https://github.com/hrsh7th/vim-vsnip )
72
+ - [ LuaSnip] ( https://github.com/L3MON4D3/LuaSnip )
73
+ - [ coc-snippets] ( https://github.com/neoclide/coc-snippets )
74
+
75
+ Use your plugin manager of choice, e.g.
76
+
77
+ #### With Lazy.nvim
78
+
79
+ ``` lua
80
+ {
81
+ " mstuttgart/vscode-odoo-snippets" ,
82
+ event = " InsertEnter" ,
83
+ }
84
+ ```
85
+
86
+ > [ !WARNING]
87
+ > If you're using LuaSnip make sure to use ` require("luasnip.loaders.from_vscode").lazy_load() ` , and add
88
+ > ` mstuttgart/vscode-odoo-snippets ` as a dependency for LuaSnip, otherwise snippets might not
89
+ > be detected. If you don't use ` lazy_load() ` you might notice a slower startup-time
90
+ >
91
+ ``` lua
92
+ {
93
+ " L3MON4D3/LuaSnip" ,
94
+ dependencies = { " mstuttgart/vscode-odoo-snippets" },
95
+ config = function ()
96
+ require (" luasnip.loaders.from_vscode" ).lazy_load ()
97
+ end ,
98
+ }
99
+ ```
100
+
101
+ #### With Packer
102
+
103
+ ``` lua
104
+ use " rafamadriz/friendly-snippets"
105
+ ```
106
+
58
107
## Usage
59
108
60
109
This extension provide support to following languages (file extensions):
@@ -63,9 +112,7 @@ This extension provide support to following languages (file extensions):
63
112
* XML (.xml)
64
113
* CSV (.csv)
65
114
66
- Use ` tab ` to navegate in snippet positions:
67
-
68
- ![ Peek 2023-03-12 10-37] ( https://user-images.githubusercontent.com/8174740/224548353-848cce14-18d6-4c67-980d-89414c6e6a0e.gif )
115
+ Use ` tab ` to navegate in snippet positions.
69
116
70
117
Below is a list of all available snippets.
71
118
@@ -194,4 +241,4 @@ See [changelog](CHANGELOG.md).
194
241
195
242
This snippets are based in [ odoo-pycharm-templates] ( https://github.com/mohamedmagdy/odoo-pycharm-templates ) project.
196
243
197
- Copyright (C) 2018-2023 by Michell Stuttgart
244
+ Copyright (C) 2018-2024 by Michell Stuttgart
0 commit comments