Skip to content

Commit

Permalink
nixvim: configure rnvimr, add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hyshka committed Nov 29, 2024
1 parent 0f3ca5c commit 515c53a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
51 changes: 23 additions & 28 deletions home/nixvim/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{inputs, ...}: {
{
inputs,
pkgs,
...
}: {
# https://github.com/JMartJonesy/kickstart.nixvim/blob/main/nixvim.nix
# https://nix-community.github.io/nixvim/search/
# https://github.com/nix-community/nixvim/blob/nixos-24.05/
Expand Down Expand Up @@ -77,6 +81,9 @@
# See `:help mapleader`
mapleader = " ";
maplocalleader = " ";

# Set to true if you have a Nerd Font installed and selected in the terminal
have_nerd_font = false;
};

# See `:help 'clipboard'`
Expand Down Expand Up @@ -146,7 +153,7 @@
cursorline = true;

# Minimal number of screen lines to keep above and below the cursor
#scrolloff = 10;
scrolloff = 1;

# See `:help hlsearch`
hlsearch = true;
Expand Down Expand Up @@ -294,6 +301,20 @@
};
};

# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraplugins#extraplugins
extraPlugins = with pkgs.vimPlugins; [
# Useful for getting pretty icons, but requires a Nerd Font.
nvim-web-devicons # TODO: Figure out how to configure using this with telescope
];

# TODO: Figure out where to move this
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraplugins#extraconfigluapre
extraConfigLuaPre = ''
if vim.g.have_nerd_font then
require('nvim-web-devicons').setup {}
end
'';

# The line beneath this is called `modeline`. See `:help modeline`
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraplugins#extraconfigluapost
extraConfigLuaPost = ''
Expand Down Expand Up @@ -334,32 +355,6 @@
#};

#plugins = {
# copilot-lua = {
# enable = true;
# suggestion.autoTrigger = true;
# };
# copilot-chat = {
# enable = true;
# };
#};

#plugins = {
# lsp = {
# enable = true;
# servers = {
# tsserver.enable = true;
# volar.enable = true;
# eslint.enable = true;
# pylsp.enable = true; # TODO python 3.10
# bashls.enable = true;
# jsonls.enable = true;
# emmet-ls.enable = true;
# html.enable = true;
# yamlls.enable = true;
# ruff-lsp.enable = true;
# nixd.enable = true;
# };
# };
# schemastore.enable = true;
# trouble.enable = true;
# typescript-tools.enable = true;
Expand Down
8 changes: 8 additions & 0 deletions home/nixvim/plugins/custom/rnvimr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
pkgs.ranger
];

# TODO:
# - edit rifle.conf for ranger

extraConfigVim = ''
let g:rnvimr_enable_ex = 1
let g:rnvimr_enable_picker = 1
'';

# TODO: ERROR Pynvim is not found in Python Lib
extraPython3Packages = p: with p; [pynvim];

Expand Down
9 changes: 8 additions & 1 deletion home/nixvim/plugins/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@
settings.formatting.command = ["alejandra"];
};

# TODO: bashls, jsonls, yamlls, schemastore
# TODO: more servers
# - eslint
# - html
# - rufflsp
# - bashls
# - jsonls
# - yamlls

lua_ls = {
enable = true;
Expand All @@ -129,6 +135,7 @@

keymaps = {
# Diagnostic keymaps
# TODO: this isn't working in normal mode
diagnostic = {
"<leader>q" = {
#mode = "n";
Expand Down

0 comments on commit 515c53a

Please sign in to comment.