i use arch btw
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add guard.nvim

+26 -7
+2 -1
nvim/.config/nvim/lazy-lock.json
··· 5 5 "dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" }, 6 6 "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, 7 7 "gitsigns.nvim": { "branch": "main", "commit": "fef5d90953f0a730483b44745fae5938ba8227f8" }, 8 + "guard.nvim": { "branch": "main", "commit": "d04113966ee7d9a8fcd7498faca83c58cea57756" }, 8 9 "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, 9 10 "lsp-zero.nvim": { "branch": "dev-v3", "commit": "b768db11b7ff3a142a779a321dee86098c82fe4f" }, 10 11 "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, ··· 18 19 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" }, 19 20 "nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" }, 20 21 "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, 21 - "nvim-lspconfig": { "branch": "master", "commit": "0d24eeafb5b531c7fac610a3508207f33c76ce6d" }, 22 + "nvim-lspconfig": { "branch": "master", "commit": "5efcd06dc9c45c1654d3f84655fd4ee2f5328f3b" }, 22 23 "nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" }, 23 24 "nvim-pqf": { "branch": "main", "commit": "f0ab5ea8388af8e6c1a7f7cdc07292b07c02662d" }, 24 25 "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
+24 -6
nvim/.config/nvim/lua/plugins.lua
··· 171 171 }, 172 172 config = function() 173 173 local lsp_zero = require('lsp-zero') 174 + local lspconfig = require('lspconfig') 175 + local schemastore = require('schemastore') 174 176 175 177 lsp_zero.on_attach(function(client, bufnr) 176 178 -- see :help lsp-zero-keybindings ··· 183 185 184 186 require('mason').setup({}) 185 187 require('mason-lspconfig').setup({ 186 - ensure_installed = { 'lua_ls', 'efm', 'clangd', 'jsonls', 'yamlls', 188 + ensure_installed = { 'lua_ls', 'clangd', 'jsonls', 'yamlls', 187 189 'jsonnet_ls' }, 188 190 handlers = { 189 191 lsp_zero.default_setup, 190 192 lua_ls = function() 191 - require('lspconfig').lua_ls.setup(lsp_zero.nvim_lua_ls()) 193 + lspconfig.lua_ls.setup(lsp_zero.nvim_lua_ls()) 192 194 end, 193 195 jsonls = function() 194 - require('lspconfig').jsonls.setup({ 196 + lspconfig.jsonls.setup({ 195 197 settings = { 196 198 json = { 197 - schemas = require('schemastore').json.schemas(), 199 + schemas = schemastore.json.schemas(), 198 200 validate = { enable = true }, 199 201 }, 200 202 }, 201 203 }) 202 204 end, 203 205 yamlls = function() 204 - require('lspconfig').yamlls.setup({ 206 + lspconfig.yamlls.setup({ 205 207 settings = { 206 208 yaml = { 207 209 schemaStore = { 208 210 enable = false, 209 211 url = '', 210 212 }, 211 - schemas = require('schemastore').yaml.schemas, 213 + schemas = schemastore.yaml.schemas, 212 214 }, 213 215 }, 214 216 }) 215 217 end, 216 218 }, 219 + }) 220 + end, 221 + }, 222 + 223 + { 224 + "nvimdev/guard.nvim", 225 + config = function() 226 + local ft = require("guard.filetype") 227 + 228 + ft("typescript,javascript,typescriptreact,json,css,html"):fmt("prettierd") 229 + ft("lua"):fmt("stylua") 230 + ft("fish"):fmt("fish_indent") 231 + 232 + require("guard").setup({ 233 + fmt_on_save = false, 234 + lsp_as_default_formatter = false, 217 235 }) 218 236 end, 219 237 },