7 files changed,
21 insertions(+),
90 deletions(-)
M
lua/keymapings.lua
@@ -52,20 +52,6 @@ nmap("<leader>to", "<cmd>UltestOutput<cr>")
nmap("<leader>tj", "<Plug>(ultest-next-fail)") nmap("<leader>tk", "<Plug>(ultest-prev-fail)") --- DAP -nmap("<leader>dt", "<cmd>lua require'dap'.toggle_breakpoint()<cr>") -nmap("<leader>db", "<cmd>lua require'dap'.step_back()<cr>") -nmap("<leader>dc", "<cmd>lua require'dap'.continue()<cr>") -nmap("<leader>dd", "<cmd>lua require'dap'.disconnect()<cr>") -nmap("<leader>dg", "<cmd>lua require'dap'.session()<cr>") -nmap("<leader>di", "<cmd>lua require'dap'.step_into()<cr>") -nmap("<leader>do", "<cmd>lua require'dap'.step_over()<cr>") -nmap("<leader>du", "<cmd>lua require'dap'.setp_out()<cr>") -nmap("<leader>dp", "<cmd>lua require'dap'.pause.toggle()<cr>") -nmap("<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>") -nmap("<leader>dc", "<cmd>lua require'dap'.continue()<cr>") -nmap("<leader>dq", "<cmd>lua require'dap'.close()<cr>") - -- Buffer nmap("<A-0>", "<cmd>BufferLast<cr>") nmap("<C-w>", "<cmd>BufferClose<cr>")
M
lua/plugin/configs/cmp.lua
@@ -1,14 +1,15 @@
local M = {} function M.setup() + require("nvim-autopairs.completion.cmp").setup {} + local cmp = require "cmp" - cmp.setup { - -- snippet = { - -- expand = function(args) - -- require("luasnip").lsp_expand(args.body) - -- end, - -- }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, formatting = { format = function(entry, vim_item) vim_item.menu = ({@@ -28,10 +29,7 @@ ["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-Space>"] = cmp.mapping.complete(), ["<C-e>"] = cmp.mapping.close(), - ["<CR>"] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }, + ["<CR>"] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }, ["<Tab>"] = function(fallback) if cmp.visible() then cmp.select_next_item()@@ -52,14 +50,12 @@ end
end, }, sources = { - { name = "nvim_lua" }, + { name = "nvim_lua", max_item_count = 5 }, { name = "nvim_lsp", max_item_count = 10 }, - { name = "buffer", keyword_length = 5, max_item_count = 5 }, + { name = "buffer", keyword_length = 4, max_item_count = 5 }, { name = "luasnip", max_item_count = 4 }, }, } - - require("nvim-autopairs.completion.cmp").setup {} end return M
D
@@ -1,15 +0,0 @@
-local M = {} - -function M.setup() - require("dap").defaults.fallback.terminal_win_cmd = "50vsplit new" - vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "LspDiagnosticsSignError", linehl = "", numhl = "" }) - vim.fn.sign_define("DapBreakpointRejected", { text = "", texthl = "LspDiagnosticsSignHint", linehl = "", numhl = "" }) - vim.fn.sign_define("DapStopped", { - text = "", - texthl = "LspDiagnosticsSignInformation", - linehl = "DiagnosticUnderlineInfo", - numhl = "LspDiagnosticsSignInformation", - }) -end - -return M
M
lua/plugin/configs/lsp/config.lua
@@ -28,10 +28,6 @@
require("nvim-lsp-installer").on_server_ready(function(server) local opts = { on_attach = on_attach } - if server.name == "sumneko_lua" then - opts = vim.tbl_deep_extend("force", opts, require "plugin.configs.lsp.providers.sumneko_lua") - end - server:setup(opts) require("lspconfig")["null-ls"].setup {}
M
lua/plugin/configs/treesitter.lua
@@ -2,16 +2,16 @@ local M = {}
function M.setup() require("nvim-treesitter.configs").setup { - ensure_installed = { "lua" }, + ensure_installed = { "lua", "go", "gomod" }, highlight = { enable = true }, - indent = { enable = true, disable = { "python" } }, - -- autotag = { enable = true }, - -- context_commentstring = { enable = true }, - -- rainbow = { - -- enable = false, - -- extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean - -- max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int - -- }, + indent = { enable = true, disable = { "python", "yml" } }, + autotag = { enable = true }, + context_commentstring = { enable = true }, + rainbow = { + enable = false, + extended_mode = true, + max_file_lines = 500, + }, } end
M
lua/plugin/init.lua
@@ -13,17 +13,11 @@ require("Comment").setup()
end, } - use { - "folke/trouble.nvim", - cmd = "TroubleToggle", - config = function() - require("trouble").setup {} - end, - } + -- use { "folke/trouble.nvim", cmd = "TroubleToggle", config = function() require("trouble").setup {} end } use { "neovim/nvim-lspconfig", - requires = { { "williamboman/nvim-lsp-installer", after = "nvim-lspconfig" } }, + requires = "williamboman/nvim-lsp-installer", config = function() require("plugin.configs.lsp.config").setup() end,@@ -50,17 +44,6 @@ config = function()
require("plugin.configs.project").setup() end, } - - -- use { - -- "mfussenegger/nvim-dap", - -- requires = { - -- { "Pocco81/DAPInstall.nvim" }, - -- { "theHamsta/nvim-dap-virtual-text", after = "nvim-dap" }, - -- }, - -- config = function() - -- require("plugin.configs.dap").setup() - -- end, - -- } use { "lewis6991/gitsigns.nvim",