130 lines
2.8 KiB
Nix
130 lines
2.8 KiB
Nix
{ pkgs, ... }:
|
||
{
|
||
globalOpts = {
|
||
# Line numbers
|
||
number = true;
|
||
relativenumber = true;
|
||
|
||
# Enable more colors (24-bit)
|
||
termguicolors = true;
|
||
|
||
# Have a better completion experience
|
||
completeopt = [
|
||
"menuone"
|
||
"noselect"
|
||
"noinsert"
|
||
];
|
||
|
||
# Always show the signcolumn, otherwise text would be shifted when displaying error icons
|
||
signcolumn = "yes:3";
|
||
|
||
# Enable mouse
|
||
mouse = "a";
|
||
|
||
# Search
|
||
ignorecase = true;
|
||
smartcase = true;
|
||
|
||
# Configure how new splits should be opened
|
||
splitright = true;
|
||
splitbelow = true;
|
||
|
||
list = true;
|
||
# NOTE: .__raw here means that this field is raw lua code
|
||
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
||
|
||
expandtab = true;
|
||
tabstop = 2;
|
||
shiftwidth = 2;
|
||
softtabstop = 0;
|
||
smarttab = true;
|
||
|
||
# Set encoding
|
||
encoding = "utf-8";
|
||
fileencoding = "utf-8";
|
||
|
||
# Save undo history
|
||
undofile = true;
|
||
swapfile = true;
|
||
backup = false;
|
||
autoread = true;
|
||
|
||
# Highlight the current line for cursor
|
||
cursorline = true;
|
||
|
||
# Show line and column when searching
|
||
ruler = true;
|
||
|
||
# Global substitution by default
|
||
gdefault = true;
|
||
|
||
# Start scrolling when the cursor is X lines away from the top/bottom
|
||
scrolloff = 5;
|
||
};
|
||
|
||
# Enable limit colomn
|
||
opts.colorcolumn = "80,120";
|
||
opts.wrap = false;
|
||
# This info is displayed in lightline
|
||
opts.showmode = false;
|
||
|
||
# UK keymap
|
||
opts.langmap = "йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ї],фa,іs,вd,аf,пg,рh,оj,лk,дl,ж\\;,є',яz,чx,сc,мv,иb,тn,ьm,б\\,,ю.,ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х{,Ї},ФA,ІS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж:,Є\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б<,Ю>,ґ`,Ґ~";
|
||
|
||
diagnostic.settings = {
|
||
update_in_insert = true;
|
||
severity_sort = true;
|
||
float = {
|
||
border = "rounded";
|
||
};
|
||
jump = {
|
||
severity.__raw = "vim.diagnostic.severity.WARN";
|
||
};
|
||
};
|
||
|
||
# userCommands = {
|
||
# Q.command = "q";
|
||
# Q.bang = true;
|
||
# Wq.command = "q";
|
||
# Wq.bang = true;
|
||
# WQ.command = "q";
|
||
# WQ.bang = true;
|
||
# W.command = "q";
|
||
# W.bang = true;
|
||
# };
|
||
|
||
globals.mapleader = ",";
|
||
|
||
# autoCmd = [
|
||
# {
|
||
# event = [ "VimEnter" ];
|
||
# callback = {
|
||
# __raw = "function() if vim.fn.argv(0) == '' then require('telescope.builtin').find_files() end end";
|
||
# };
|
||
# }
|
||
# {
|
||
# event = [ "VimEnter" ];
|
||
# command = "set relativenumber";
|
||
# }
|
||
# ];
|
||
#autoCmd = [
|
||
# {
|
||
# event = [ "BufEnter" "BufWinEnter" ];
|
||
# pattern = [ "*.md" "*.mdx" ];
|
||
# command = "MarkdownPreviewToggle";
|
||
# }
|
||
#];
|
||
|
||
# highlight = {
|
||
# Comment.fg = "#ff00ff";
|
||
# Comment.bg = "#000000";
|
||
# Comment.underline = true;
|
||
# Comment.bold = true;
|
||
# };
|
||
|
||
withNodeJs = false;
|
||
withPerl = false;
|
||
withPython3 = false;
|
||
withRuby = false;
|
||
}
|