Last manual config (for now).
This commit is contained in:
parent
9081c45880
commit
da0b0bc5e9
9 changed files with 109 additions and 35 deletions
|
|
@ -17,17 +17,21 @@ vim.opt.syntax = on
|
|||
-- Enable undo after closing vim
|
||||
vim.opt.undofile = true
|
||||
|
||||
-- Make vim work with russian layout
|
||||
local function escape(str)
|
||||
local escape_chars = [[;,."|\]]
|
||||
return vim.fn.escape(str, escape_chars)
|
||||
-- vim.g.lightline = { colorscheme = "one" }
|
||||
|
||||
-- Autostart nvim-tree
|
||||
local function open_nvim_tree(data)
|
||||
local real_file = vim.fn.filereadable(data.file) == 1
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if real_file or no_name then
|
||||
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
|
||||
elseif directory then
|
||||
vim.cmd.enew()
|
||||
vim.cmd.cd(data.file)
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
end
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
||||
local en = [[`qwertyuiop[]asdfghjkl;'zxcvbnm]] local ru = [[ёйцукенгшщзхъфывапролджэячсмить]]
|
||||
local en_shift = [[~QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>]]
|
||||
local ru_shift = [[ËЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ]]
|
||||
|
||||
vim.opt.langmap = vim.fn.join({
|
||||
escape(ru_shift) .. ';' .. escape(en_shift),
|
||||
escape(ru) .. ';' .. escape(en),
|
||||
}, ',')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue