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
da1068fdc2
commit
846f37457c
10 changed files with 54 additions and 57 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
lvim.format_on_save = false
|
lvim.format_on_save = true
|
||||||
lvim.lint_on_save = true
|
lvim.lint_on_save = true
|
||||||
lvim.colorscheme = "onedarker"
|
lvim.colorscheme = "onedarker"
|
||||||
|
|
||||||
|
|
@ -12,29 +12,19 @@ lvim.builtin.gitsigns.opts.current_line_blame = true
|
||||||
lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 }
|
lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 }
|
||||||
|
|
||||||
-- TreeSitter
|
-- TreeSitter
|
||||||
lvim.builtin.treesitter.ensure_installed = {
|
lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "yaml", "toml", "lua", "go", "gomod" }
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"jsdoc",
|
|
||||||
"yaml",
|
|
||||||
"toml",
|
|
||||||
"lua",
|
|
||||||
"go",
|
|
||||||
}
|
|
||||||
lvim.builtin.treesitter.indent.disable = { "python" }
|
lvim.builtin.treesitter.indent.disable = { "python" }
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
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 = {
|
lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "target", "env", ".bin" }
|
||||||
".git",
|
|
||||||
"node_modules",
|
|
||||||
"env",
|
|
||||||
".bin",
|
|
||||||
}
|
|
||||||
|
|
||||||
-- NvimTree
|
-- NvimTree
|
||||||
lvim.builtin.nvimtree.ignore = { ".git", "node_modules", ".bin", "env" }
|
lvim.builtin.nvimtree.ignore = { ".git", "node_modules", ".bin", "env" }
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
-- lvim.lsp.override = {"gopls"}
|
||||||
|
|
||||||
-- Others
|
-- Others
|
||||||
require "user.plugins"
|
require "user.plugins"
|
||||||
require "user.keymaps"
|
require "user.keymaps"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
lvim.lang.go.formatters = {
|
lvim.lang.go.formatters = {
|
||||||
{ exe = "gofumpt" },
|
{ exe = "gofumpt" },
|
||||||
-- { exe = "gofmt" },
|
-- { exe = "gofmt" },
|
||||||
-- { exe = "goimports" },
|
{ exe = "goimports" },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Debugger
|
-- Debugger
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ lvim.lang.lua.formatters = {
|
||||||
|
|
||||||
lvim.lang.lua.linters = {
|
lvim.lang.lua.linters = {
|
||||||
-- { exe = "luacheck" },
|
-- { exe = "luacheck" },
|
||||||
-- { exe = "selene" },
|
{ exe = "selene" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
local ok, tabnine = pcall(require, "cmp_tabnine.config")
|
local ok, tabnine_cfg = pcall(require, "cmp_tabnine.config")
|
||||||
if not ok then
|
if not ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
tabnine:setup {
|
tabnine_cfg:setup {
|
||||||
max_lines = 1000,
|
max_lines = 1000,
|
||||||
max_num_results = 10,
|
max_num_results = 10,
|
||||||
sort = true,
|
sort = true,
|
||||||
|
|
|
||||||
8
config/lvim/lua/plug/ultest.lua
Normal file
8
config/lvim/lua/plug/ultest.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
-- GOlang
|
||||||
|
vim.g["test#go#gotest#optiongs"] = "-v --short"
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
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>"
|
||||||
|
lvim.keys.term_mode["jk"] = "<C-\\><C-n>"
|
||||||
lvim.keys.visual_mode["jk"] = "<esc>"
|
lvim.keys.visual_mode["jk"] = "<esc>"
|
||||||
|
|
||||||
-- Which key
|
-- Which key
|
||||||
lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" }
|
-- lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" }
|
||||||
lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" }
|
lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" }
|
||||||
lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" }
|
lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" }
|
||||||
lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" }
|
lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" }
|
||||||
|
|
@ -19,6 +20,7 @@ lvim.builtin.which_key.mappings["t"] = {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Beffers
|
-- Beffers
|
||||||
|
lvim.keys.normal_mode["<A-0>"] = "<cmd>BufferLast<cr>"
|
||||||
local fmt = string.format
|
local fmt = string.format
|
||||||
for i = 1, 9 do
|
for i = 1, 9 do
|
||||||
lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i)
|
lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ lvim.plugins = {
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require "plug.todo-comment"
|
require("plug.todo-comment").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -19,7 +19,7 @@ lvim.plugins = {
|
||||||
run = "./install.sh",
|
run = "./install.sh",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require "plug.tabnine"
|
require("plug.tabnine").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -33,7 +33,7 @@ lvim.plugins = {
|
||||||
"Smirnov-O/ts-unit.nvim",
|
"Smirnov-O/ts-unit.nvim",
|
||||||
keys = { "vip", "cip", "yip", "dip" },
|
keys = { "vip", "cip", "yip", "dip" },
|
||||||
config = function()
|
config = function()
|
||||||
require "plug.ts-unit"
|
require("plug.ts-unit").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -41,13 +41,10 @@ lvim.plugins = {
|
||||||
requires = {
|
requires = {
|
||||||
{ "vim-test/vim-test", after = "vim-ultest" },
|
{ "vim-test/vim-test", after = "vim-ultest" },
|
||||||
},
|
},
|
||||||
|
cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" },
|
||||||
run = ":UpdateRemotePlugins",
|
run = ":UpdateRemotePlugins",
|
||||||
cmd = {
|
config = function()
|
||||||
"Ultest",
|
require("plug.ultest").setup()
|
||||||
"UltestStop",
|
end,
|
||||||
"UltestClear",
|
|
||||||
"UltestNearest",
|
|
||||||
"UltestOutput",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue