feat: small improvements (#25)
- Renamed and moved settings in some plugins due to upstream changes - Added comments to neovim settings - Added cmdheight = 0 and mouse = "a" settings to config
This commit is contained in:
parent
01025e42f3
commit
502d31e03c
5 changed files with 275 additions and 159 deletions
|
|
@ -2,54 +2,77 @@
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
|
||||||
{
|
{
|
||||||
mode = ["n" "x"];
|
mode = ["n" "x"];
|
||||||
key = "j";
|
key = "j";
|
||||||
action = "v:count == 0 ? 'gj' : 'j'";
|
action = "v:count == 0 ? 'gj' : 'j'";
|
||||||
options = {expr = true; silent = true;};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = ["n" "x"];
|
mode = ["n" "x"];
|
||||||
key = "<Down>";
|
key = "<Down>";
|
||||||
action = "v:count == 0 ? 'gj' : 'j'";
|
action = "v:count == 0 ? 'gj' : 'j'";
|
||||||
options = {expr = true; silent = true;};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = ["n" "x"];
|
mode = ["n" "x"];
|
||||||
key = "k";
|
key = "k";
|
||||||
action = "v:count == 0 ? 'gk' : 'k'";
|
action = "v:count == 0 ? 'gk' : 'k'";
|
||||||
options = {expr = true; silent = true;};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = ["n" "x"];
|
mode = ["n" "x"];
|
||||||
key = "<Up>";
|
key = "<Up>";
|
||||||
action = "v:count == 0 ? 'gk' : 'k'";
|
action = "v:count == 0 ? 'gk' : 'k'";
|
||||||
options = {expr = true; silent = true;};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-h>";
|
key = "<C-h>";
|
||||||
action = "<C-w>h";
|
action = "<C-w>h";
|
||||||
options = {desc = "Go to Left Window"; remap = true;};
|
options = {
|
||||||
|
desc = "Go to Left Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-j>";
|
key = "<C-j>";
|
||||||
action = "<C-w>j";
|
action = "<C-w>j";
|
||||||
options = {desc = "Go to Lower Window"; remap = true;};
|
options = {
|
||||||
|
desc = "Go to Lower Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-k>";
|
key = "<C-k>";
|
||||||
action = "<C-w>k";
|
action = "<C-w>k";
|
||||||
options = {desc = "Go to Upper Window"; remap = true;};
|
options = {
|
||||||
|
desc = "Go to Upper Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-l>";
|
key = "<C-l>";
|
||||||
action = "<C-w>l";
|
action = "<C-w>l";
|
||||||
options = {desc = "Go to Right Window"; remap = true;};
|
options = {
|
||||||
|
desc = "Go to Right Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
|
@ -148,37 +171,55 @@
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "n";
|
key = "n";
|
||||||
action = "'Nn'[v:searchforward].'zv'";
|
action = "'Nn'[v:searchforward].'zv'";
|
||||||
options = {expr = true; desc = "Next Search Result";};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Next Search Result";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "x";
|
mode = "x";
|
||||||
key = "n";
|
key = "n";
|
||||||
action = "'Nn'[v:searchforward]";
|
action = "'Nn'[v:searchforward]";
|
||||||
options = {expr = true; desc = "Next Search Result";};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Next Search Result";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "o";
|
mode = "o";
|
||||||
key = "n";
|
key = "n";
|
||||||
action = "'Nn'[v:searchforward]";
|
action = "'Nn'[v:searchforward]";
|
||||||
options = {expr = true; desc = "Next Search Result";};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Next Search Result";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "N";
|
key = "N";
|
||||||
action = "'nN'[v:searchforward].'zv'";
|
action = "'nN'[v:searchforward].'zv'";
|
||||||
options = {expr = true; desc = "Prev Search Result";};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Prev Search Result";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "x";
|
mode = "x";
|
||||||
key = "N";
|
key = "N";
|
||||||
action = "'nN'[v:searchforward]";
|
action = "'nN'[v:searchforward]";
|
||||||
options = {expr = true; desc = "Prev Search Result";};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Prev Search Result";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "o";
|
mode = "o";
|
||||||
key = "N";
|
key = "N";
|
||||||
action = "'nN'[v:searchforward]";
|
action = "'nN'[v:searchforward]";
|
||||||
options = {expr = true; desc = "Prev Search Result";};
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Prev Search Result";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
|
@ -274,37 +315,55 @@
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ww";
|
key = "<leader>ww";
|
||||||
action = "<C-W>p";
|
action = "<C-W>p";
|
||||||
options = {desc = "Other Window"; remap = true;};
|
options = {
|
||||||
|
desc = "Other Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>wd";
|
key = "<leader>wd";
|
||||||
action = "<C-W>c";
|
action = "<C-W>c";
|
||||||
options = {desc = "Delete Window"; remap = true;};
|
options = {
|
||||||
|
desc = "Delete Window";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>w-";
|
key = "<leader>w-";
|
||||||
action = "<C-W>s";
|
action = "<C-W>s";
|
||||||
options = {desc = "Split Window Below"; remap = true;};
|
options = {
|
||||||
|
desc = "Split Window Below";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>w|";
|
key = "<leader>w|";
|
||||||
action = "<C-W>v";
|
action = "<C-W>v";
|
||||||
options = {desc = "Split Window Right"; remap = true;};
|
options = {
|
||||||
|
desc = "Split Window Right";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>-";
|
key = "<leader>-";
|
||||||
action = "<C-W>s";
|
action = "<C-W>s";
|
||||||
options = {desc = "Split Window Below"; remap = true;};
|
options = {
|
||||||
|
desc = "Split Window Below";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>|";
|
key = "<leader>|";
|
||||||
action = "<C-W>v";
|
action = "<C-W>v";
|
||||||
options = {desc = "Split Window Right"; remap = true;};
|
options = {
|
||||||
|
desc = "Split Window Right";
|
||||||
|
remap = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
|
@ -344,4 +403,3 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
_: {
|
_: {
|
||||||
plugins.todo-comments = {
|
plugins.todo-comments = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings = {
|
||||||
colors = {
|
colors = {
|
||||||
error = ["DiagnosticError" "ErrorMsg" "#ED8796"];
|
error = ["DiagnosticError" "ErrorMsg" "#ED8796"];
|
||||||
warning = ["DiagnosticWarn" "WarningMsg" "#EED49F"];
|
warning = ["DiagnosticWarn" "WarningMsg" "#EED49F"];
|
||||||
|
|
@ -9,4 +10,5 @@ _: {
|
||||||
test = ["Identifier" "#8AADF4"];
|
test = ["Identifier" "#8AADF4"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@
|
||||||
'';
|
'';
|
||||||
plugins.conform-nvim = {
|
plugins.conform-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
formatOnSave = ''
|
settings = {
|
||||||
|
format_on_save = ''
|
||||||
function(bufnr)
|
function(bufnr)
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
return
|
return
|
||||||
|
|
@ -61,7 +62,7 @@
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
formatAfterSave = ''
|
format_after_save = ''
|
||||||
function(bufnr)
|
function(bufnr)
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
return
|
return
|
||||||
|
|
@ -74,8 +75,8 @@
|
||||||
return { lsp_fallback = true }
|
return { lsp_fallback = true }
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
notifyOnError = true;
|
notify_on_error = true;
|
||||||
formattersByFt = {
|
formatters_by_ft = {
|
||||||
html = [
|
html = [
|
||||||
[
|
[
|
||||||
"prettierd"
|
"prettierd"
|
||||||
|
|
@ -166,4 +167,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,14 @@
|
||||||
plugins = {
|
plugins = {
|
||||||
bufferline = {
|
bufferline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
options = {
|
||||||
diagnostics = "nvim_lsp";
|
diagnostics = "nvim_lsp";
|
||||||
mode = "buffers";
|
mode = "buffers";
|
||||||
|
|
||||||
closeIcon = " ";
|
close_icon = " ";
|
||||||
bufferCloseIcon = " ";
|
buffer_close_icon = " ";
|
||||||
modifiedIcon = " ";
|
modified_icon = " ";
|
||||||
|
|
||||||
offsets = [
|
offsets = [
|
||||||
{
|
{
|
||||||
|
|
@ -19,6 +21,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
|
|
||||||
|
|
@ -14,29 +14,78 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
|
# Show line numbers
|
||||||
number = true;
|
number = true;
|
||||||
|
|
||||||
|
# Show relative line numbers
|
||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
|
|
||||||
|
# Use the system clipboard
|
||||||
clipboard = "unnamedplus";
|
clipboard = "unnamedplus";
|
||||||
|
|
||||||
|
# Number of spaces that represent a <TAB>
|
||||||
tabstop = 2;
|
tabstop = 2;
|
||||||
softtabstop = 2;
|
softtabstop = 2;
|
||||||
|
|
||||||
|
# Show tabline always
|
||||||
showtabline = 2;
|
showtabline = 2;
|
||||||
|
|
||||||
|
# Use spaces instead of tabs
|
||||||
expandtab = true;
|
expandtab = true;
|
||||||
|
|
||||||
|
# Enable smart indentation
|
||||||
smartindent = true;
|
smartindent = true;
|
||||||
|
|
||||||
|
# Number of spaces to use for each step of (auto)indent
|
||||||
shiftwidth = 2;
|
shiftwidth = 2;
|
||||||
|
|
||||||
|
# Enable break indent
|
||||||
breakindent = true;
|
breakindent = true;
|
||||||
|
|
||||||
|
# Highlight the screen line of the cursor
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
|
|
||||||
|
# Minimum number of screen lines to keep above and below the cursor
|
||||||
scrolloff = 8;
|
scrolloff = 8;
|
||||||
|
|
||||||
|
# Enable mouse support
|
||||||
|
mouse = "a";
|
||||||
|
|
||||||
|
# Set folding method to manual
|
||||||
foldmethod = "manual";
|
foldmethod = "manual";
|
||||||
|
|
||||||
|
# Disable folding by default
|
||||||
foldenable = false;
|
foldenable = false;
|
||||||
|
|
||||||
|
# Wrap long lines at a character in 'breakat'
|
||||||
linebreak = true;
|
linebreak = true;
|
||||||
|
|
||||||
|
# Disable spell checking
|
||||||
spell = false;
|
spell = false;
|
||||||
|
|
||||||
|
# Disable swap file creation
|
||||||
swapfile = false;
|
swapfile = false;
|
||||||
|
|
||||||
|
# Time in milliseconds to wait for a mapped sequence to complete
|
||||||
timeoutlen = 300;
|
timeoutlen = 300;
|
||||||
|
|
||||||
|
# Enable 24-bit RGB color in the TUI
|
||||||
termguicolors = true;
|
termguicolors = true;
|
||||||
|
|
||||||
|
# Don't show mode in the command line
|
||||||
showmode = false;
|
showmode = false;
|
||||||
|
|
||||||
|
# Open new split below the current window
|
||||||
splitbelow = true;
|
splitbelow = true;
|
||||||
|
|
||||||
|
# Keep the screen when splitting
|
||||||
splitkeep = "screen";
|
splitkeep = "screen";
|
||||||
|
|
||||||
|
# Open new split to the right of the current window
|
||||||
splitright = true;
|
splitright = true;
|
||||||
|
|
||||||
|
# Hide command line unless needed
|
||||||
|
cmdheight = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue