aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/mini.lua
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-06 12:06:27 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-06 12:06:27 +0800
commit1b37f7d7f1554f4ef4cd185c1181d54d9956b1db (patch)
tree54057c5cee90f3a93b240d77828f14f90af8c93f /vim/mini.lua
parenta9386c536189f2aaf38c9e2ba674a096657ca366 (diff)
Update
Diffstat (limited to 'vim/mini.lua')
-rw-r--r--vim/mini.lua67
1 files changed, 43 insertions, 24 deletions
diff --git a/vim/mini.lua b/vim/mini.lua
index 177d80a..7451258 100644
--- a/vim/mini.lua
+++ b/vim/mini.lua
@@ -564,11 +564,14 @@ require("lazy").setup({
564 require("telescope").setup({ 564 require("telescope").setup({
565 defaults = { 565 defaults = {
566 preview = { 566 preview = {
567 filesize_limit = 0.5,
567 filesize_hook = function(filepath, bufnr, opts) 568 filesize_hook = function(filepath, bufnr, opts)
568 local max_bytes = 100000 569 local max_bytes = 10000
569 local cmd = { "head", "-c", max_bytes, filepath } 570 local cmd = { "head", "-c", max_bytes, filepath }
570 require('telescope.previewers.utils').job_maker(cmd, bufnr, opts) 571 require('telescope.previewers.utils').job_maker(cmd, bufnr, opts)
571 end 572 end,
573 timeout = 50,
574 highlight_limit = 1,
572 }, 575 },
573 mappings = { 576 mappings = {
574 i = { 577 i = {
@@ -644,10 +647,10 @@ require("lazy").setup({
644 "<leader>sF", 647 "<leader>sF",
645 function() 648 function()
646 require("telescope.builtin").find_files({ 649 require("telescope.builtin").find_files({
647 follow = ture, 650 follow = ture,
648 no_ignore = true, 651 no_ignore = true,
649 hidden = true, 652 hidden = true,
650 file_ignore_patterns = {}, 653 file_ignore_patterns = {},
651 }) 654 })
652 end, 655 end,
653 { desc = "telescope find all files" } 656 { desc = "telescope find all files" }
@@ -826,24 +829,22 @@ require("lazy").setup({
826 lazy = false, 829 lazy = false,
827 config = function() 830 config = function()
828 require("which-key").setup({ 831 require("which-key").setup({
829 defaults = { 832 win = {
830 win = { 833 -- don't allow the popup to overlap with the cursor
831 -- don't allow the popup to overlap with the cursor 834 no_overlap = false,
832 no_overlap = false, 835 -- width = 1,
833 -- width = 1, 836 height = { min = 10, max = 25 },
834 height = { min = 10, max = 25 }, 837 -- col = 0,
835 -- col = 0, 838 -- row = math.huge,
836 -- row = math.huge, 839 -- border = "none",
837 -- border = "none", 840 padding = { 1, 2 }, -- extra window padding [top/bottom, right/left]
838 padding = { 1, 2 }, -- extra window padding [top/bottom, right/left] 841 title = false,
839 title = true, 842 title_pos = "center",
840 title_pos = "center", 843 zindex = 1000,
841 zindex = 1000, 844 -- Additional vim.wo and vim.bo options
842 -- Additional vim.wo and vim.bo options 845 bo = {},
843 bo = {}, 846 wo = {
844 wo = { 847 -- winblend = 10, -- value between 0-100 0 for fully opaque and 100 for fully transparent
845 -- winblend = 10, -- value between 0-100 0 for fully opaque and 100 for fully transparent
846 },
847 }, 848 },
848 }, 849 },
849 }) 850 })
@@ -1477,6 +1478,24 @@ require("lazy").setup({
1477 -- end, 1478 -- end,
1478 -- }, 1479 -- },
1479 -- -- }}} 1480 -- -- }}}
1481 -- ALE {{{
1482 {
1483 'dense-analysis/ale',
1484 config = function()
1485 -- Configuration goes here.
1486 local g = vim.g
1487
1488 g.ale_ruby_rubocop_auto_correct_all = 1
1489
1490 g.ale_linters = {
1491 ruby = { 'javascript', 'standard' },
1492 lua = { 'lua_language_server' }
1493 }
1494
1495 vim.keymap.set("n", "\a", vim.cmd("ALEDisable"))
1496 end
1497 },
1498 -- }}}
1480}) 1499})
1481 1500
1482-- KEYMAPS {{{ 1501-- KEYMAPS {{{