Started experimenting with neovim
This commit is contained in:
parent
91b3d93de6
commit
9ad9e6d7c3
13
flake.lock
13
flake.lock
|
@ -23,17 +23,18 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1663760840,
|
||||
"narHash": "sha256-ym5Iycs5H4cOaLfE2/vC0tsLp8XuBJQIHGV8/uXSy8M=",
|
||||
"lastModified": 1664017330,
|
||||
"narHash": "sha256-919WZKBTxFdTkzIK6uJXE7hwSPQb7e/ekybxxWaotR4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9bdbbaa634aa666eb6a27096bdcb991c59181244",
|
||||
"rev": "fde244a8c7655bc28616864e2290ad9c95409c2c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-22.05",
|
||||
"type": "indirect"
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
description = "My Nix Configuration";
|
||||
|
||||
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.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
./rofi.nix
|
||||
./sway/sway.nix
|
||||
./tmux.nix
|
||||
./vim/vim.nix
|
||||
#./vim/vim.nix
|
||||
./neovim.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
|
|
95
users/alejandro/neovim.nix
Normal file
95
users/alejandro/neovim.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue