Update nvim config, zsh

This commit is contained in:
Smirnov-O 2021-07-01 10:43:59 +03:00
parent f20307981c
commit c1cc0c9ebe
9 changed files with 65 additions and 72 deletions

View file

@ -24,13 +24,32 @@ require'lualine'.setup {options={
}}
-- GitSigns
require'plug.gitsigns'
require'gitsigns'.setup {
signs = {
add = {hl = 'GitSignsAdd', text = ''};
change = {hl = 'GitSignsChange', text = ''};
delete = {hl = 'GitSignsDelete', text = '_'};
topdelete = {hl = 'GitSignsDelete', text = ''};
changedelete = {hl = 'GitSignsChange', text = '~'};
};
watch_index = {interval = 1000};
current_line_blame = true,
sign_priority = 6,
update_debounce = 100,
status_formatter = nil,
use_decoration_api = true,
use_internal_diff = true,
}
-- NeoGit
require'neogit'.setup {}
-- NvimTree
require'plug.nvimtree'
vim.g.nvim_tree_side = "right"
vim.g.nvim_tree_ignore = {".git", ".cache", "node_modules", "__pycache__", "venv", "env"}
vim.g.nvim_tree_auto_close = 0
vim.g.nvim_tree_quit_on_open = 0
vim.g.nvim_tree_width = 24
-- TreeSitter
require'nvim-treesitter.configs'.setup {
@ -39,4 +58,14 @@ require'nvim-treesitter.configs'.setup {
}
-- Colorizer
-- require'plug.colorizer'
require'colorizer'.setup({'*';}, {
mode = 'background';
RGB = true;
RRGGBB = true;
RRGGBBAA = false;
rgb_fn = true;
hsl_fn = false;
css = false;
css_fn = true;
names = false;
})

View file

@ -1,7 +1,4 @@
-- Python
local black = {
formatCommand = "black ${filename}", formatStdin = true
}
local flake8 = {
lintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -",
lintStdin = true,
@ -9,9 +6,6 @@ local flake8 = {
}
-- Javascript
local prettier = {
formatCommand = "prettier --stdin-filepath ${INPUT}", formatStdin = true
}
local eslint = {
lintCommand = "./node_modules/.bin/eslint -f unix --stdin --stdin-filename ${INPUT}",
lintIgnoreExitCode = true,
@ -31,15 +25,15 @@ local golint = {
-- Setup
require"lspconfig".efm.setup {
init_options = {documentFormatting = true, codeAction = false},
init_options = {documentFormatting = false, codeAction = false},
filetypes = {"python", "javascript", "typescript", "go"},
settings = {
rootMarkers = {".git/"},
languages = {
python = {flake8, black},
javascript = {eslint, prettier},
typescript = {eslint, prettier},
python = {flake8},
javascript = {eslint},
typescript = {eslint},
go = {golint}
}
}
};
};
}

View file

@ -1,11 +0,0 @@
require'colorizer'.setup({'*';}, {
mode = 'background';
RGB = true;
RRGGBB = true;
RRGGBBAA = false;
rgb_fn = true;
hsl_fn = false;
css = false;
css_fn = true;
names = false;
})

View file

@ -1,18 +0,0 @@
require'gitsigns'.setup {
signs = {
add = {hl = 'GitSignsAdd', text = ''};
change = {hl = 'GitSignsChange', text = ''};
delete = {hl = 'GitSignsDelete', text = '_'};
topdelete = {hl = 'GitSignsDelete', text = ''};
changedelete = {hl = 'GitSignsChange', text = '~'};
};
watch_index = {
interval = 1000
};
current_line_blame = true,
sign_priority = 6,
update_debounce = 100,
status_formatter = nil,
use_decoration_api = true,
use_internal_diff = true,
}

View file

@ -1,8 +0,0 @@
local S = vim.g
-- Settings
S.nvim_tree_side = "right"
S.nvim_tree_ignore = {".git", ".cache", "node_modules", "__pycache__", "venv", "env"}
S.nvim_tree_auto_close = 0
S.nvim_tree_quit_on_open = 0
S.nvim_tree_width = 24

View file

@ -1,17 +1,17 @@
require('lspconfig').typescript.setup({
handlers = {
["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config)
if params.diagnostics ~= nil then
local idx = 1
while idx <= #params.diagnostics do
if params.diagnostics[idx].code == 80001 then
table.remove(params.diagnostics, idx)
else
idx = idx + 1
end
end
end
vim.lsp.diagnostic.on_publish_diagnostics(_, _, params, client_id, _, config)
end,
},
handlers = {
["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config)
if params.diagnostics ~= nil then
local idx = 1
while idx <= #params.diagnostics do
if params.diagnostics[idx].code == 80001 then
table.remove(params.diagnostics, idx)
else
idx = idx + 1
end
end
end
vim.lsp.diagnostics.on_publish_diagnostics(_, _, params, client_id, _, config)
end,
},
})