@@ -98,8 +98,6 @@ require('lazy').setup {
9898 --- @type snacks.Config
9999 --- @diagnostic disable-next-line : missing-fields
100100 opts = {
101- lazygit = { enabled = true },
102- git = { enabled = true },
103101 picker = {
104102 hidden = true ,
105103 matcher = {
@@ -109,8 +107,6 @@ require('lazy').setup {
109107 win = {
110108 input = {
111109 keys = {
112- [' <C-u>' ] = { ' preview_scroll_up' , mode = { ' i' , ' n' } },
113- [' <C-d>' ] = { ' preview_scroll_down' , mode = { ' i' , ' n' } },
114110 [' <C-k>' ] = { ' history_back' , mode = { ' i' , ' n' } },
115111 [' <C-j>' ] = { ' history_forward' , mode = { ' i' , ' n' } },
116112 },
@@ -305,13 +301,6 @@ require('lazy').setup {
305301 { -- NOTE: Must be loaded before dependants
306302 ' mason-org/mason.nvim' ,
307303 config = true ,
308- keys = {
309- {
310- ' <leader>lm' ,
311- ' <cmd>Mason<cr>' ,
312- desc = ' [m]ason' ,
313- },
314- },
315304 },
316305
317306 { ' mason-org/mason-lspconfig.nvim' },
@@ -346,9 +335,6 @@ require('lazy').setup {
346335 auto_show_delay_ms = 0 ,
347336 },
348337 },
349- signature = {
350- enabled = true ,
351- },
352338 },
353339 },
354340
@@ -467,63 +453,38 @@ require('lazy').setup {
467453 {
468454 ' <leader>lf' ,
469455 function ()
470- require (' conform' ).format { async = true , lsp_format = ' never ' }
456+ require (' conform' ).format { lsp_format = ' prefer ' }
471457 end ,
472458 desc = ' [f]ormat buffer' ,
473459 },
474460 },
475- config = function ()
476- -- WARNING: eslint-lsp is not a formatter, so we cannot return it, but it provides a command for formatting,
477- local prettier_paths = { vim .g .monorepo_name }
478-
479- local js_ts_formatters_callback = function (bufnr )
480- local buf_modified = vim .api .nvim_get_option_value (' modified' , { buf = bufnr })
481-
482- if buf_modified then
483- vim .cmd ' silent! EslintFixAll'
484- end
485-
486- for i = 1 , # prettier_paths do
487- if string.find (vim .api .nvim_buf_get_name (bufnr ), prettier_paths [i ]) then
488- return { ' prettierd' }
489- end
490-
491- return {}
492- end
493- end
494-
495- require (' conform' ).setup {
496- notify_on_error = false ,
497- format_on_save = function ()
498- return {
499- timeout_ms = 500 ,
500- lsp_format = ' never' ,
501- }
502- end ,
503- formatters_by_ft = {
504- lua = { ' stylua' },
505-
506- javascript = js_ts_formatters_callback ,
507- javascriptreact = js_ts_formatters_callback ,
508- vue = js_ts_formatters_callback ,
509- typescript = js_ts_formatters_callback ,
510- typescriptreact = js_ts_formatters_callback ,
511-
512- css = { ' prettierd' },
513- scss = { ' prettierd' },
514- less = { ' prettierd' },
515- sass = { ' prettierd' },
516-
517- markdown = { ' markdownlint' },
518- vimwiki = { ' markdownlint' },
519-
520- html = { ' prettierd' },
521- php = { ' prettier' },
522- yaml = { ' prettierd' },
523- json = { ' prettier' }, -- NOTE: nice to have prettierd, but it creates bugs in japanese characters
524- },
525- }
526- end ,
461+ -- This will provide type hinting with LuaLS
462+ --- @module " conform"
463+ --- @type conform.setupOpts
464+ opts = {
465+ format_on_save = { lsp_format = ' prefer' },
466+ formatters_by_ft = {
467+ lua = { ' stylua' },
468+
469+ javascript = { ' prettierd' },
470+ javascriptreact = { ' prettierd' },
471+ vue = { ' prettierd' },
472+ typescript = { ' prettierd' },
473+ typescriptreact = { ' prettierd' },
474+
475+ css = { ' prettierd' },
476+ scss = { ' prettierd' },
477+ less = { ' prettierd' },
478+ sass = { ' prettierd' },
479+ html = { ' prettierd' },
480+ php = { ' prettier' },
481+ yaml = { ' prettierd' },
482+ json = { ' prettier' }, -- NOTE: nice to have prettierd, but it creates bugs in japanese characters
483+
484+ markdown = { ' markdownlint' },
485+ vimwiki = { ' markdownlint' },
486+ },
487+ },
527488 },
528489
529490 { -- Highlight, edit, and navigate code
0 commit comments