From 0cc4a179cfed5c2be516186dd134c6d208b7f2a9 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 25 Oct 2024 11:58:32 +0800 Subject: Update --- vim/mini.lua | 79 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) (limited to 'vim/mini.lua') diff --git a/vim/mini.lua b/vim/mini.lua index 7451258..6c81d8f 100644 --- a/vim/mini.lua +++ b/vim/mini.lua @@ -1420,43 +1420,43 @@ require("lazy").setup({ }, -- }}} - -- lspsaga {{{ - { - 'nvimdev/lspsaga.nvim', - dependencies = { - 'nvim-treesitter/nvim-treesitter', -- optional - 'nvim-tree/nvim-web-devicons', -- optional - }, - config = function() - require('lspsaga').setup({ - autochdir = true, - lightbulb = { - sign = false, - virtual_text = true, - }, - }) - vim.api.nvim_create_autocmd("LspAttach", { - group = custom_autocommands, - pattern = "*", - callback = function(args) - local map = vim.api.nvim_buf_set_keymap - map(0, "n", "gd", "Lspsaga goto_definition", { silent = true, noremap = true }) - map(0, "n", "gR", "Lspsaga rename", { silent = true, noremap = true }) - map(0, "n", "gx", "Lspsaga code_action", { silent = true, noremap = true }) - map(0, "x", "gx", ":Lspsaga range_code_action", { silent = true, noremap = true }) - map(0, "n", "K", "Lspsaga hover_doc", { silent = true, noremap = true }) - map(0, "n", "go", "Lspsaga show_line_diagnostics", { silent = true, noremap = true }) - map(0, "n", "gj", "Lspsaga diagnostic_jump_next", { silent = true, noremap = true }) - map(0, "n", "gk", "Lspsaga diagnostic_jump_prev", { silent = true, noremap = true }) - - -- Don't know why... Everytime when modeline is set and insert a single char - -- while inside a fold, the fold closes. - vim.opt_local.modeline = false - end, - }) - end - }, - -- }}} + -- -- lspsaga {{{ + -- { + -- 'nvimdev/lspsaga.nvim', + -- dependencies = { + -- 'nvim-treesitter/nvim-treesitter', -- optional + -- 'nvim-tree/nvim-web-devicons', -- optional + -- }, + -- config = function() + -- require('lspsaga').setup({ + -- autochdir = true, + -- lightbulb = { + -- sign = false, + -- virtual_text = true, + -- }, + -- }) + -- vim.api.nvim_create_autocmd("LspAttach", { + -- group = custom_autocommands, + -- pattern = "*", + -- callback = function(args) + -- local map = vim.api.nvim_buf_set_keymap + -- map(0, "n", "gd", "Lspsaga goto_definition", { silent = true, noremap = true }) + -- map(0, "n", "gR", "Lspsaga rename", { silent = true, noremap = true }) + -- map(0, "n", "gx", "Lspsaga code_action", { silent = true, noremap = true }) + -- map(0, "x", "gx", ":Lspsaga range_code_action", { silent = true, noremap = true }) + -- map(0, "n", "K", "Lspsaga hover_doc", { silent = true, noremap = true }) + -- map(0, "n", "go", "Lspsaga show_line_diagnostics", { silent = true, noremap = true }) + -- map(0, "n", "gj", "Lspsaga diagnostic_jump_next", { silent = true, noremap = true }) + -- map(0, "n", "gk", "Lspsaga diagnostic_jump_prev", { silent = true, noremap = true }) + -- + -- -- Don't know why... Everytime when modeline is set and insert a single char + -- -- while inside a fold, the fold closes. + -- vim.opt_local.modeline = false + -- end, + -- }) + -- end + -- }, + -- -- }}} -- -- conform {{{ -- { -- "stevearc/conform.nvim", @@ -1488,9 +1488,12 @@ require("lazy").setup({ g.ale_ruby_rubocop_auto_correct_all = 1 g.ale_linters = { - ruby = { 'javascript', 'standard' }, + javascript = { 'javascript', 'standard' }, lua = { 'lua_language_server' } } + g.ale_fixers = {javascript = {'standard'}} + g.ale_lint_on_save = 1 + g.ale_fix_on_save = 1 vim.keymap.set("n", "\a", vim.cmd("ALEDisable")) end -- cgit v1.2.3-70-g09d2