Started experimenting with neovim

This commit is contained in:
Alejandro Angulo 2022-09-25 11:01:06 -07:00
parent 91b3d93de6
commit 9ad9e6d7c3
4 changed files with 105 additions and 8 deletions

View file

@ -23,17 +23,18 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1663760840, "lastModified": 1664017330,
"narHash": "sha256-ym5Iycs5H4cOaLfE2/vC0tsLp8XuBJQIHGV8/uXSy8M=", "narHash": "sha256-919WZKBTxFdTkzIK6uJXE7hwSPQb7e/ekybxxWaotR4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9bdbbaa634aa666eb6a27096bdcb991c59181244", "rev": "fde244a8c7655bc28616864e2290ad9c95409c2c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "NixOS",
"ref": "nixos-22.05", "ref": "nixos-unstable",
"type": "indirect" "repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {

View file

@ -2,7 +2,7 @@
description = "My Nix Configuration"; description = "My Nix Configuration";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-22.05"; home-manager.url = "github:nix-community/home-manager/release-22.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
}; };

View file

@ -12,7 +12,8 @@
./rofi.nix ./rofi.nix
./sway/sway.nix ./sway/sway.nix
./tmux.nix ./tmux.nix
./vim/vim.nix #./vim/vim.nix
./neovim.nix
./zsh.nix ./zsh.nix
]; ];

View file

@ -0,0 +1,95 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [fzf fd];
programs.neovim = {
enable = true;
withNodeJs = true;
withPython3 = true;
extraPython3Packages = ps: with ps; [black isort flake8 ipdb];
#extraPackages = with pkgs; [];
plugins = with pkgs.vimPlugins; [
# tree-sitter (code parser)
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
# Eye candy
nvim-web-devicons
base16-vim
# Telescope (fuzzy finding)
{
plugin = telescope-nvim;
config = ''
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
'';
}
{
plugin = telescope-file-browser-nvim;
type = "lua";
config = ''
vim.api.nvim_set_keymap(
"n",
"<space>fb",
":Telescope file_browser<CR>",
{ noremap = true }
)
require("telescope").load_extension("file_browser")
'';
}
{
plugin = telescope-coc-nvim;
type = "lua";
config = ''
require("telescope").setup({
extensions = {
coc = {
prefer_locations = true;
}
}
})
require("telescope").load_extension("coc")
vim.api.nvim_set_keymap(
"n",
"<leader>coc",
":Telescope coc<CR>",
{ noremap = true }
)
'';
}
# tmux integration
tmux-navigator
];
coc = {
enable = true;
settings = ''
{
coc.preferences.formatOnSaveFiletypes": [
"*"
],
python.formatting.provider": "black"
}
'';
};
extraConfig = ''
let mapleader = "'"
" Colorscheme
if !exists('g:colors_name') || g:colors_name != 'base16-darktooth'
set background=dark
let base16colorspace=256
colorscheme base16-darktooth
hi Normal ctermbg=NONE guibg=NONE
endif
'';
};
}