You've already forked dotfiles
exp: Testing out yaml-companion plugin, moving nvim-lint to being on a
hotkey rather than on bufread and bufwrite
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
local function get_schema()
|
||||
local schema = require('yaml-companion').get_buf_schema(0)
|
||||
if schema.result[1].name == 'none' then
|
||||
return ''
|
||||
end
|
||||
return schema.result[1].name
|
||||
end
|
||||
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
-- options = {
|
||||
-- component_separators = { left = '\\', right = '/' },
|
||||
-- component_separators = { left = '⧹', right = '⧸' },
|
||||
-- section_separators = { left = '', right = '' },
|
||||
-- globalstatus = true,
|
||||
-- theme = 'gruvbox',
|
||||
-- },
|
||||
tabline = {
|
||||
lualine_a = {
|
||||
'tabs',
|
||||
@@ -16,6 +17,11 @@ return {
|
||||
lualine_z = {
|
||||
'buffers',
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_x = {
|
||||
'encoding', 'fileformat', 'filetype', get_schema
|
||||
},
|
||||
}
|
||||
}
|
||||
end,
|
||||
|
||||
@@ -5,10 +5,18 @@ return {
|
||||
yaml = { 'cfn_lint' }
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufWritePost', 'BufReadPost' }, {
|
||||
callback = function()
|
||||
require('lint').try_lint()
|
||||
end,
|
||||
})
|
||||
-- vim.api.nvim_create_autocmd({ 'BufWritePost', 'BufReadPost' }, {
|
||||
-- callback = function()
|
||||
-- require('lint').try_lint()
|
||||
-- end,
|
||||
-- })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
';l',
|
||||
function()
|
||||
require('lint').try_lint()
|
||||
end
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
8
nvim/lua/plugins/yaml-companion.lua
Normal file
8
nvim/lua/plugins/yaml-companion.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
'mosheavni/yaml-companion.nvim',
|
||||
config = function(_, opts)
|
||||
local cfg = require('yaml-companion').setup(opts)
|
||||
vim.lsp.config('yamlls', cfg)
|
||||
vim.lsp.enable('yamlls')
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user