Skip to content

Commit

Permalink
nixvim comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Octelly committed Nov 5, 2024
1 parent 854358a commit 80db55c
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions homes/x86_64-linux/octelly@xia-pc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,31 @@ with config; {
defaultEditor = true;

extraPlugins = with pkgs.vimPlugins; [
sonokai
moonscript-vim
sonokai # theme
moonscript-vim # language support
];

globals = {
# Sonokai has multiple styles
sonokai_style = "shusia";

# substitution live preview
inccomand = "nosplit";

# WARNING: blah blah this is experimental
# if you encounter issues, disable this
# NOTE: seems to not be working atm anyway :)
cmdheight = 0;
};


colorscheme = "sonokai";

opts = {
# relative line numbers
number = true;
relativenumber = true;

# wrapped lines continue with same indentation on next line
breakindent = true;

# save undo history
Expand All @@ -180,16 +182,15 @@ with config; {
# mode is shown in lualine
showmode = false;

# linebreak so that words aren't split when wrap
# linebreak so that words aren't split when wrapped
linebreak = true;
};

extraConfigLua = ''
--vim.g.sonokai_style = 'shusia'
--vim.cmd([[colorscheme sonokai]])
-- font to be used in GUIs such as Neovide
vim.o.guifont = "${builtins.elemAt fonts.fontconfig.defaultFonts.monospace 0}:h12"
-- check if Neovide options are available
if vim.g.neovide then
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_remember_window_size = true
Expand All @@ -198,20 +199,24 @@ with config; {
end
'';

# https://editorconfig.org/
editorconfig.enable = true;

keymaps =
let
mkRaw = x: { __raw = x; };
in
[
# exit terminal mode with 2x escape
# (default keybind is something esoteric and weird)
{
key = "<Esc><Esc>";
action = "<C-\\><C-n>";
mode = "t";
}

# smart-splits
# (see plugin explanation later in the config)
{
mode = "n";
key = "<S-Left>";
Expand Down Expand Up @@ -288,8 +293,10 @@ with config; {
};
};

# formatting provided by LSPs
lsp-format.enable = true;

# pictograms for LSP completions
lspkind = {
enable = true;
cmp.enable = cmp.enable;
Expand All @@ -307,18 +314,21 @@ with config; {
enable = true;
};

# pretty diagnostics, references, quickfixes, etc.
trouble.enable = true;

# detect tab/spaces and width
sleuth.enable = true;

# better code understanding - code tree
treesitter = {
enable = true;

# use tresitter as fold method
folding = true;
};

# keep definition of nested functions and such pinned on top
treesitter-context = {
enable = true;
settings = rec {
Expand All @@ -327,6 +337,7 @@ with config; {
};
};

# smart rename + some extras
treesitter-refactor = {
enable = true;
highlightDefinitions.enable = true;
Expand All @@ -335,6 +346,7 @@ with config; {
smartRename.enable = true;
};

# see project directory (cd into project with :cd)
nvim-tree = {
enable = true;
syncRootWithCwd = true;
Expand Down Expand Up @@ -391,6 +403,7 @@ with config; {
# settings.auto_start = "shut-up";
#};

# completions and integrations
cmp.enable = true;

cmp-path.enable = true;
Expand All @@ -399,6 +412,7 @@ with config; {
cmp-nvim-lsp-signature-help.enable = true;
cmp-treesitter.enable = true;

# UI framework of sorts that some plugins hook into
fidget.enable = true;

#cursorline = {
Expand All @@ -407,6 +421,7 @@ with config; {
# cursorword.enable = true;
#};

# bottom statusline
lualine = {
enable = true;

Expand Down

0 comments on commit 80db55c

Please sign in to comment.