neovim: install mind, setup some lsp for lua and more telescope bindings
This commit is contained in:
parent
f795c8123c
commit
1b805cdde4
@ -38,7 +38,7 @@ telescope.load_extension('fzf')
|
|||||||
require("nvim-tree").setup({
|
require("nvim-tree").setup({
|
||||||
renderer = {
|
renderer = {
|
||||||
icons = {
|
icons = {
|
||||||
show = false,
|
--show = false,
|
||||||
webdev_colors = false,
|
webdev_colors = false,
|
||||||
show = {
|
show = {
|
||||||
file = false,
|
file = false,
|
||||||
@ -50,23 +50,33 @@ require("nvim-tree").setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require 'mind'.setup()
|
||||||
|
|
||||||
cmd [[highlight NvimTreeOpenedFolderName guifg=default]]
|
cmd [[highlight NvimTreeOpenedFolderName guifg=default]]
|
||||||
cmd [[highlight NvimTreeFolderName guifg=default]]
|
cmd [[highlight NvimTreeFolderName guifg=default]]
|
||||||
|
|
||||||
local lspc = require("lspconfig")
|
local lspc = require("lspconfig")
|
||||||
lspc.gopls.setup {};
|
lspc.gopls.setup {};
|
||||||
lspc.nil_ls.setup {};
|
lspc.nil_ls.setup {};
|
||||||
|
lspc.sumneko_lua.setup {};
|
||||||
|
|
||||||
o.hlsearch = true;
|
o.hlsearch = true;
|
||||||
|
|
||||||
map('n', '<C-n>', ':NvimTreeToggle<CR>', { noremap = true })
|
map('n', '<C-n>', ':NvimTreeToggle<CR>', { noremap = true })
|
||||||
map('n', '<C-p>', ':Files<CR>', { noremap = true })
|
map('n', '<C-p>', ':Files<CR>', { noremap = true })
|
||||||
map('n', '<C-m>', ':Telescope manix<CR>', {noremap = true})
|
|
||||||
map('n', '<leader>r', ':NvimTreeRefresh<CR>', { noremap = true })
|
map('n', '<leader>r', ':NvimTreeRefresh<CR>', { noremap = true })
|
||||||
map('n', '<leader>s', ':%s/\\s\\+$//e', { noremap = true })
|
map('n', '<leader>s', ':%s/\\s\\+$//e', { noremap = true })
|
||||||
|
map('n', '<leader>fm', ':Telescope manix<CR>', {})
|
||||||
|
|
||||||
map('n', '<leader>1', ':GitGutterToggle<CR>', { noremap = true })
|
map('n', '<leader>1', ':GitGutterToggle<CR>', { noremap = true })
|
||||||
map('n', '<leader>2', ':set list!<CR>', { noremap = true })
|
map('n', '<leader>2', ':set list!<CR>', { noremap = true })
|
||||||
map('n', '<leader>3', ':set nu!<CR>', { noremap = true })
|
map('n', '<leader>3', ':set nu!<CR>', { noremap = true })
|
||||||
map('n', '<leader>4', ':set paste!<CR>', { noremap = true })
|
map('n', '<leader>4', ':set paste!<CR>', { noremap = true })
|
||||||
|
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||||
|
|
||||||
|
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||||
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||||
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||||
|
@ -21,6 +21,19 @@ let
|
|||||||
sha256 = "sha256-eea0Ntr3gCmF6iZ0adZaVswWH70K9IJZ4SAyVSdFp3E=";
|
sha256 = "sha256-eea0Ntr3gCmF6iZ0adZaVswWH70K9IJZ4SAyVSdFp3E=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
mind = pkgs.vimUtils.buildVimPluginFrom2Nix rec {
|
||||||
|
pname = "mind.nvim";
|
||||||
|
version = "2.2.1";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "phaazon";
|
||||||
|
repo = pname;
|
||||||
|
rev = "79e0ca131d5e37dfa65f3f0e725d99742e4ff783";
|
||||||
|
sha256 = "sha256-y64F9v7Ggzagmz2p2EYTdtKDuGyA19xYXqW92S0tRj0=";
|
||||||
|
};
|
||||||
|
nativeBuildBuildInputs = with vimPlugins; [
|
||||||
|
plenary-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
baseVimPackages = with vimPlugins; [
|
baseVimPackages = with vimPlugins; [
|
||||||
fugitive
|
fugitive
|
||||||
fzf-vim
|
fzf-vim
|
||||||
@ -32,12 +45,14 @@ let
|
|||||||
telescope-nvim
|
telescope-nvim
|
||||||
vimagit
|
vimagit
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
|
vim-lua
|
||||||
vim-nix
|
vim-nix
|
||||||
vim-ocaml
|
vim-ocaml
|
||||||
zig-vim
|
zig-vim
|
||||||
|
|
||||||
parchment
|
parchment
|
||||||
vacme
|
vacme
|
||||||
|
mind
|
||||||
];
|
];
|
||||||
myVimPackages = if pkgs.system == "aarch64-linux" then
|
myVimPackages = if pkgs.system == "aarch64-linux" then
|
||||||
baseVimPackages
|
baseVimPackages
|
||||||
@ -45,12 +60,14 @@ let
|
|||||||
baseVimPackages ++ [ vimPlugins.vim-go vimPlugins.telescope-manix ];
|
baseVimPackages ++ [ vimPlugins.vim-go vimPlugins.telescope-manix ];
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
fzf
|
||||||
go
|
go
|
||||||
gopls
|
gopls
|
||||||
gotools
|
gotools
|
||||||
ripgrep
|
luaformatter
|
||||||
fzf
|
|
||||||
manix
|
manix
|
||||||
|
ripgrep
|
||||||
|
sumneko-lua-language-server
|
||||||
];
|
];
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user