mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Update lvim
This commit is contained in:
parent
d1af9278c5
commit
0b99d6c75c
9 changed files with 25 additions and 38 deletions
|
|
@ -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" } },
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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", {})
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
5
config/lvim/lsp-settings/gopls.json
Normal file
5
config/lvim/lsp-settings/gopls.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"go.lintTool": "golint",
|
||||||
|
"go.lintOnSave": "file",
|
||||||
|
"go.formatTool": "gofmt"
|
||||||
|
}
|
||||||
|
|
@ -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
|
|
||||||
7
config/lvim/lua/user/dap-virtual-text.lua
Normal file
7
config/lvim/lua/user/dap-virtual-text.lua
Normal 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
|
|
||||||
|
|
@ -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,
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue