mirror of
https://codeberg.org/Mo8it/server_dotfiles.git
synced 2024-09-17 18:51:17 +00:00
Replace neovim with Helix
This commit is contained in:
parent
1b45938e2c
commit
d27c1a7c2f
2 changed files with 51 additions and 86 deletions
51
.config/helix/config.toml
Normal file
51
.config/helix/config.toml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
theme = "onedark"
|
||||||
|
|
||||||
|
[editor]
|
||||||
|
mouse = false
|
||||||
|
shell = ["fish", "-c"]
|
||||||
|
cursorline = true
|
||||||
|
true-color = true
|
||||||
|
bufferline = "multiple"
|
||||||
|
color-modes = true
|
||||||
|
|
||||||
|
[editor.lsp]
|
||||||
|
display-messages = true
|
||||||
|
|
||||||
|
[editor.cursor-shape]
|
||||||
|
insert = "bar"
|
||||||
|
normal = "block"
|
||||||
|
select = "underline"
|
||||||
|
|
||||||
|
[editor.whitespace.render]
|
||||||
|
space = "none"
|
||||||
|
tab = "none"
|
||||||
|
newline = "all"
|
||||||
|
|
||||||
|
[editor.indent-guides]
|
||||||
|
render = true
|
||||||
|
|
||||||
|
[keys.normal]
|
||||||
|
p = "paste_clipboard_after"
|
||||||
|
P = "paste_clipboard_before"
|
||||||
|
y = "yank_joined_to_clipboard"
|
||||||
|
D = ["yank_main_selection_to_clipboard", "delete_selection"]
|
||||||
|
C-d = ["extend_to_line_bounds", "delete_selection"]
|
||||||
|
V = "extend_to_line_end"
|
||||||
|
|
||||||
|
C-k = "goto_next_buffer"
|
||||||
|
C-j = "goto_previous_buffer"
|
||||||
|
C-b = ":buffer-close"
|
||||||
|
|
||||||
|
esc = ["collapse_selection", "keep_primary_selection"]
|
||||||
|
|
||||||
|
[keys.insert]
|
||||||
|
esc = ["collapse_selection", "normal_mode"]
|
||||||
|
|
||||||
|
[keys.select]
|
||||||
|
p = "replace_selections_with_clipboard"
|
||||||
|
P = "no_op"
|
||||||
|
y = "yank_joined_to_clipboard"
|
||||||
|
D = ["yank_main_selection_to_clipboard", "delete_selection"]
|
||||||
|
V = "extend_to_line_end"
|
||||||
|
|
||||||
|
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
|
|
@ -1,86 +0,0 @@
|
||||||
-- autocmd.lua
|
|
||||||
--------------
|
|
||||||
|
|
||||||
-- Highlight on yank
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
||||||
pattern = "*",
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank({ timeout = 1200 })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- keybindings.lua
|
|
||||||
------------------
|
|
||||||
|
|
||||||
local set = vim.keymap.set
|
|
||||||
local opts = {
|
|
||||||
silent = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- cmd string
|
|
||||||
local function cmd(command)
|
|
||||||
return "<cmd>" .. command .. "<CR>"
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
set("", "<Space>", "<Nop>", opts)
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
set("n", "<space>l", cmd("noh"), opts)
|
|
||||||
|
|
||||||
set("v", ">", ">gv", opts)
|
|
||||||
set("v", "<", "<gv", opts)
|
|
||||||
|
|
||||||
set("n", "<C-d>", cmd("bd"), opts)
|
|
||||||
|
|
||||||
-- options.lua
|
|
||||||
--------------
|
|
||||||
|
|
||||||
local o = vim.o
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
o.mouse = ""
|
|
||||||
|
|
||||||
o.expandtab = true
|
|
||||||
o.tabstop = 4
|
|
||||||
o.shiftwidth = 4
|
|
||||||
o.smartindent = true
|
|
||||||
|
|
||||||
o.number = true
|
|
||||||
|
|
||||||
o.ignorecase = true
|
|
||||||
o.smartcase = true
|
|
||||||
|
|
||||||
o.gdefault = true
|
|
||||||
|
|
||||||
o.termguicolors = true
|
|
||||||
|
|
||||||
o.wrap = false
|
|
||||||
|
|
||||||
o.whichwrap = "b,s,h,l,<,>,[,]"
|
|
||||||
|
|
||||||
o.clipboard = "unnamedplus"
|
|
||||||
|
|
||||||
o.undofile = true
|
|
||||||
|
|
||||||
o.showmode = false
|
|
||||||
|
|
||||||
o.scrolloff = 3
|
|
||||||
o.sidescrolloff = 5
|
|
||||||
|
|
||||||
o.cursorline = true
|
|
||||||
|
|
||||||
o.shell = "/usr/bin/fish"
|
|
||||||
|
|
||||||
o.confirm = true
|
|
||||||
|
|
||||||
o.linebreak = true
|
|
||||||
|
|
||||||
o.laststatus = 3
|
|
||||||
|
|
||||||
o.pumblend = 10
|
|
Loading…
Reference in a new issue