10 files changed,
54 insertions(+),
57 deletions(-)
jump to
M
config/lvim/config.lua
··· 1 -lvim.format_on_save = false 1 +lvim.format_on_save = true 2 2 lvim.lint_on_save = true 3 3 lvim.colorscheme = "onedarker" 4 4 ··· 12 12 lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 } 13 13 14 14 -- TreeSitter 15 -lvim.builtin.treesitter.ensure_installed = { 16 - "javascript", 17 - "typescript", 18 - "jsdoc", 19 - "yaml", 20 - "toml", 21 - "lua", 22 - "go", 23 -} 15 +lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "yaml", "toml", "lua", "go", "gomod" } 24 16 lvim.builtin.treesitter.indent.disable = { "python" } 25 17 26 18 -- Telescope 27 19 lvim.builtin.telescope.defaults.layout_config.prompt_position = "top" 28 -lvim.builtin.telescope.defaults.file_ignore_patterns = { 29 - ".git", 30 - "node_modules", 31 - "env", 32 - ".bin", 33 -} 20 +lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "target", "env", ".bin" } 34 21 35 22 -- NvimTree 36 23 lvim.builtin.nvimtree.ignore = { ".git", "node_modules", ".bin", "env" } 24 + 25 +-- LSP 26 +-- lvim.lsp.override = {"gopls"} 37 27 38 28 -- Others 39 29 require "user.plugins"
M
config/lvim/ftplugin/javascript.lua
··· 1 1 lvim.lang.javascript.formatters = { 2 - -- { exe = "eslint_d" }, 3 - { exe = "prettierd" }, 2 + -- { exe = "eslint_d" }, 3 + { exe = "prettierd" }, 4 4 } 5 5 6 6 lvim.lang.javascript.linters = { 7 - { exe = "eslint_d" }, 7 + { exe = "eslint_d" }, 8 8 } 9 9 10 10 -- Debugger ··· 12 12 13 13 -- Lsp 14 14 lvim.lang.javascript.lsp.setup.handlers = { 15 - ["textDocument/publishDiagnostics"] = function(_, _, p, id, _, cfg) 16 - if p.diagnostics ~= nil then 17 - local i = 1 18 - while i <= #p.diagnostics do 19 - if p.diagnostics[i].code == 80001 then 20 - table.remove(p.diagnostics, i) 21 - else 22 - i = i + 1 23 - end 24 - end 25 - end 26 - vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, id, _, cfg) 27 - end, 15 + ["textDocument/publishDiagnostics"] = function(_, _, p, id, _, cfg) 16 + if p.diagnostics ~= nil then 17 + local i = 1 18 + while i <= #p.diagnostics do 19 + if p.diagnostics[i].code == 80001 then 20 + table.remove(p.diagnostics, i) 21 + else 22 + i = i + 1 23 + end 24 + end 25 + end 26 + vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, id, _, cfg) 27 + end, 28 28 }
M
config/lvim/lua/plug/tabnine.lua
··· 1 1 local M = {} 2 2 3 3 function M.setup() 4 - local ok, tabnine = pcall(require, "cmp_tabnine.config") 4 + local ok, tabnine_cfg = pcall(require, "cmp_tabnine.config") 5 5 if not ok then 6 6 return 7 7 end 8 8 9 - tabnine:setup { 9 + tabnine_cfg:setup { 10 10 max_lines = 1000, 11 11 max_num_results = 10, 12 12 sort = true,
M
config/lvim/lua/user/keymaps.lua
··· 1 1 lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>" 2 2 lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>" 3 +lvim.keys.term_mode["jk"] = "<C-\\><C-n>" 3 4 lvim.keys.visual_mode["jk"] = "<esc>" 4 5 5 6 -- Which key 6 -lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" } 7 +-- lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" } 7 8 lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" } 8 9 lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" } 9 10 lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" } ··· 19 20 } 20 21 21 22 -- Beffers 23 +lvim.keys.normal_mode["<A-0>"] = "<cmd>BufferLast<cr>" 22 24 local fmt = string.format 23 25 for i = 1, 9 do 24 26 lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i)
M
config/lvim/lua/user/plugins.lua
··· 11 11 "folke/todo-comments.nvim", 12 12 event = "BufRead", 13 13 config = function() 14 - require "plug.todo-comment" 14 + require("plug.todo-comment").setup() 15 15 end, 16 16 }, 17 17 { ··· 19 19 run = "./install.sh", 20 20 event = "InsertEnter", 21 21 config = function() 22 - require "plug.tabnine" 22 + require("plug.tabnine").setup() 23 23 end, 24 24 }, 25 25 { ··· 33 33 "Smirnov-O/ts-unit.nvim", 34 34 keys = { "vip", "cip", "yip", "dip" }, 35 35 config = function() 36 - require "plug.ts-unit" 36 + require("plug.ts-unit").setup() 37 37 end, 38 38 }, 39 39 { ··· 41 41 requires = { 42 42 { "vim-test/vim-test", after = "vim-ultest" }, 43 43 }, 44 + cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" }, 44 45 run = ":UpdateRemotePlugins", 45 - cmd = { 46 - "Ultest", 47 - "UltestStop", 48 - "UltestClear", 49 - "UltestNearest", 50 - "UltestOutput", 51 - }, 46 + config = function() 47 + require("plug.ultest").setup() 48 + end, 52 49 }, 53 50 }