add mc functions
This commit is contained in:
parent
e025e0103e
commit
1b6f9eda72
3 changed files with 41 additions and 0 deletions
|
@ -258,6 +258,11 @@ All that is saved in image, so that is why image is so heavy.
|
|||
|
||||
### Commands and keys
|
||||
|
||||
#### Vim functions for activating different modes
|
||||
|
||||
- `MCModeAnsible`
|
||||
- `MCModeHelm`
|
||||
|
||||
#### General
|
||||
|
||||
|keys|action|
|
||||
|
|
1
init.lua
1
init.lua
|
@ -20,3 +20,4 @@ vim.opt.termguicolors = true
|
|||
require("lazy-load")
|
||||
-- load general config
|
||||
require("general")
|
||||
require("mc-functions")
|
||||
|
|
35
lua/mc-functions.lua
Normal file
35
lua/mc-functions.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
function mc_mode_ansible()
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
yml = "yaml.ansible",
|
||||
yaml = "yaml.ansible",
|
||||
},
|
||||
})
|
||||
vim.cmd [[
|
||||
LspStart ansiblels
|
||||
]]
|
||||
end
|
||||
|
||||
function mc_mode_helm()
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
yml = "helm",
|
||||
yaml = "helm",
|
||||
},
|
||||
})
|
||||
vim.cmd [[
|
||||
LspStart helm_ls
|
||||
LspStop yamlls
|
||||
]]
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
'MCModeAnsible',
|
||||
mc_mode_ansible,
|
||||
{}
|
||||
)
|
||||
vim.api.nvim_create_user_command(
|
||||
'MCModeHelm',
|
||||
mc_mode_helm,
|
||||
{}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue