Update lvim

This commit is contained in:
Smirnov-O 2021-09-12 23:27:06 +03:00
parent d1af9278c5
commit 0b99d6c75c
9 changed files with 25 additions and 38 deletions

View file

@ -9,7 +9,7 @@ lvim.builtin.autopairs.active = true
-- GitSigns -- GitSigns
lvim.builtin.gitsigns.opts.current_line_blame = true lvim.builtin.gitsigns.opts.current_line_blame = true
lvim.builtin.gitsigns.opts.current_line_blame_opts = { virt_text = true, virt_text_pos = "eol", delay = 200 } lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 }
-- TreeSitter -- TreeSitter
lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua", "java" } lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua", "java" }
@ -19,6 +19,9 @@ lvim.builtin.treesitter.indent.disable = { "clojure", "java", "python" }
lvim.builtin.telescope.defaults.layout_config.prompt_position = "top" lvim.builtin.telescope.defaults.layout_config.prompt_position = "top"
lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "env" } lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "env" }
-- Debugger
lvim.builtin.dap.active = true
-- Mappings -- Mappings
lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>" lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>"
lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>" lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>"
@ -33,10 +36,9 @@ end
-- Plugins -- Plugins
lvim.plugins = { lvim.plugins = {
{ "tpope/vim-surround", keys = { "c", "y", "d" } }, { "tpope/vim-surround", keys = { "c", "y", "d" } },
{ "andymass/vim-matchup", keys = { "%" } }, -- { "andymass/vim-matchup", keys = { "%" } },
{ "tzachar/cmp-tabnine", run = "./install.sh", event = "InsertEnter" }, { "tzachar/cmp-tabnine", run = "./install.sh", event = "InsertEnter" },
{ "folke/trouble.nvim", cmd = { "TroubleToggle" } }, { "folke/trouble.nvim", cmd = { "TroubleToggle" } },
{ "folke/todo-comments.nvim", event = "BufRead" }, { "folke/todo-comments.nvim", event = "BufRead" },
{ "mfussenegger/nvim-jdtls", ft = { "java" } }, { "theHamsta/nvim-dap-virtual-text", config = "require[[user.dap-virtual-text]].setup()" },
{ "npxbr/glow.nvim", ft = { "markdown" }, cmd = { "Glow" } },
} }

View file

@ -1,5 +1,7 @@
lvim.format_on_save = true
lvim.lang.go.formatters = { lvim.lang.go.formatters = {
{ exe = "gofmt" }, { exe = "gofmt" },
{ exe = "goimports" }, { exe = "goimports" },
} }
-- Debugger
require("dap-install").config("go_delve", {})

View file

@ -7,6 +7,10 @@ lvim.lang.javascript.linters = {
{ exe = "eslint_d" }, { exe = "eslint_d" },
} }
-- Debugger
require("dap-install").config("jsnode", {})
-- Lsp
lvim.lang.javascript.lsp.setup.handlers = { lvim.lang.javascript.lsp.setup.handlers = {
["textDocument/publishDiagnostics"] = function(_, _, p, client_id, _, config) ["textDocument/publishDiagnostics"] = function(_, _, p, client_id, _, config)
if p.diagnostics ~= nil then if p.diagnostics ~= nil then

View file

@ -0,0 +1,5 @@
{
"go.lintTool": "golint",
"go.lintOnSave": "file",
"go.formatTool": "gofmt"
}

View file

@ -1,14 +0,0 @@
local M = {}
M.config = function()
require("package-info").setup({{
autostart = true,
colors = { up_to_date = "#3C4048", outdated = "#6ec0fa" },
icons = {
enable = true,
style = { up_to_date = "|  ", outdated = "|  " },
},
}})
end
return M

View file

@ -0,0 +1,7 @@
local M = {}
M.setup = function ()
vim.g.dap_virtual_text = true
end
return M

@ -1 +0,0 @@
Subproject commit 148c430da4e02dab923ec86c10baf0d7bcb976ee

View file

@ -1,18 +0,0 @@
local pack_path = vim.fn.stdpath("data") .. "/site/pack"
local fmt = string.format
local function ensure(user, repo)
local install_path = fmt("%s/packer/start/%s", pack_path, repo, repo)
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.api.nvim_command(fmt("!git clone https://github.com/%s/%s %s", user, repo, install_path))
vim.api.nvim_command(fmt("packadd %s", repo))
end
end
ensure("wbthomason", "packer.nvim")
ensure("Olical", "aniseed")
vim.g["aniseed#env"] = {
module = "config.init",
compile = true,
}