started nvim rewrite in fnl

This commit is contained in:
Anish Lakhwara 2024-08-24 03:51:29 -07:00
parent 2f93cff966
commit 0f34a00a4e
8 changed files with 240 additions and 349 deletions

View file

@ -0,0 +1,29 @@
(local nvim (require :lib/nvim))
(nvim.g :mapleader " ")
(nvim.opt :runtimepath (.. vim.opt.runtimepath "/home/anish/.config/nvim/,"))
(nvim.opt :tabstop 2)
(nvim.opt :showmatch)
(nvim.opt :shiftwidth 2)
(nvim.opt :autoindent)
(nvim.opt :undofile)
(nvim.opt :signcolumn "auto:4")
(nvim.opt :title)
(nvim.opt :number)
(nvim.opt :nocompatible)
(nvim.opt :relativenumber)
(nvim.opt :showtabline 2)
(nvim.opt :expandtab)
(nvim.opt :autowriteall)
(nvim.opt :lisp) ; include - in word to move better in snake-case)
(nvim.g :sexp_filetypes "clojure,scheme,lisp,janet,fennel,yuck") ; include the lisps I use
(nvim.opt :termguicolors)
(nvim.colorscheme "ayu-mirage")
(require :conf.plugins)
(require :conf.mappings)
(require :conf.lsp)
(require :conf.formatting)

View file

@ -0,0 +1,7 @@
; Set Diagnostics
; local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
; for type, icon in pairs(signs) do
; local hl = "DiagnosticSign" .. type
; vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl})
; end

View file

@ -0,0 +1,84 @@
(local nvim (require :lib/nvim))
(local wk (require :which-key))
(local
normal-map-leader
{"t" [""
"Toggle neo-tree"]
"w" ["<cmd>:w<cr>"
"Write file"]
"q" ["<cmd>:q<cr>"
"Quit"]
"r" [":RainbowParenthesesToggleAll<CR>"
"Toggle Rainbow Parens"]
; Telescope
"f" {:Name "Files"
:f ["<cmd>Telescope find_files<cr>"
"Find Files (in Telescope)"]
:g ["<cmd>Telescope live_grep<cr>"
"Find Grep (in Telescope)"]
:b ["<cmd>Telescope buffers<cr>"
"Find Buffers"]
:h ["<cmd>Telescope help_tags<cr>"
"Find Help"]
:t ["<cmd>Telescope tags<cr>"
"Find Tags"]
:r ["<cmd>Telescope oldfiles<CR>"
"Recent files"]}
; Git
"g" {:Name "Git"
"s" [":G<CR>"
"Git Status"]
"f" [":G fetch --all"
"Git Fetch"]
"b" [":GBranches"
"Git Branch"]
"p" [":Git! push"
"Git Push"]
"d" [":GDiff"
"Git Diff"]
"h" [""
"Commit Hunk under Cursor"]}
; nmap <leader>gl :diffget //3<CR>
; nmap <leader>gh :diffget //2<CR>
; nnoremap <leader>gc :G commit -v -q %:p<CR>
; Buffers
"b" {:Name "Buffer"
:a [""
"Buffer Add"]
:q [""
"Buffer Quit"]
:n [""
"Buffer Next"]
:N ["<cmd>:tabp<CR>"
"Buffer Previous"]
:p ["<cmd>:tabp<CR>"
"Buffer Previous"]}
; Search
"s" {:Name "Search"
:b ["<cmd>Telescope current_buffer_fuzzy_find<CR>"
"Search in current buffer"]
:s ["<cmd>Telescope live_grep<CR>"
"Search in project"]
:t ["<cmd>TodoTelescope<CR>"
"Search TODOs in project"]
:c ["<cmd>let @/ = \"\"<CR>:echo 'Search highlight cleared'<CR>"
"Clear search"]}
; Code
"c" {:Name "Code"
:d [":lua vim.lsp.buf.definition()<CR>"
"Go to Definition"]
:i [":lua require('telescope.builtin').lsp_implementation()<CR>"
"Implementation"]
:s [":lua vim.lsp.buf.signature_help()<CR>"
"Signature Help"]
:r [":Lspsaga rename<CR>"
"Rename Symbol"]
:h [":Lspsaga hover_doc<CR>"
"Hover doc"]
:o [":LSoutlineToggle<CR>"
"Outline"]}
; Kitaab
"z" {:Name "Kitaab"}})
(wk.register normal-map-leader {:prefix "<leader>"})

View file

@ -0,0 +1,3 @@
(local nvim (require :lib/nvim))
(nvim.g :tidal_target "terminal")

View file

@ -0,0 +1,37 @@
-- A function that applies passes the output of string.format to the print
-- function
---@param string string #template string
local function fprint(string, ...)
print(string.format(string, ...))
end
if pcall(require, "hotpot") then
-- Setup hotpot.nvim
require("hotpot").setup({
provide_require_fennel = true,
-- show fennel compiler results in when editing fennel files
enable_hotpot_diagnostics = true,
compiler = {
-- options passed to fennel.compile for modules, defaults to {}
modules = {
-- not default but recommended, align lua lines with fnl source
-- for more debuggable errors, but less readable lua.
correlate = true
},
macros = {
-- allow macros to access vim global, needed for nyoom modules
env = "_COMPILER",
compilerEnv = _G,
allowGlobals = true,
},
}
})
-- Import neovim configuration
require("conf")
else
print("Unable to require hotpot")
end
-- vim.cmd[[colorscheme tokyonight]]
-- -- vim.cmd[[colorscheme lumona]]
-- vim.cmd[[packadd cfilter]]

View file

@ -0,0 +1,37 @@
(fn autocmd [events opts]
"Create autocommand"
(vim.api.nvim_create_autocmd events opts))
(fn clear-autocmds [opts]
"Clear autocommands"
(vim.api.nvim_clear_autocmds opts))
(fn augroup [name ?opts]
"Create autocommand group"
(vim.api.nvim_create_augroup name (or opts {})))
(fn keymap [mode lhs rhs ?opts]
"Sets a global mapping for the given mode.
Ex: `(keymap [:n :i] ...)`"
(let [string-mode (table.concat mode)]
(vim.api.nvim_set_keymap string-mode lhs rhs (or opts {}))))
(fn opt [key value]
"Set a vim option"
(tset vim.opt key value))
(fn g [key value]
"Set a vim global"
(tset vim.g key value))
(fn colorscheme [name]
"Set the current colorscheme"
(vim.cmd (.. "colorscheme " name)))
{: autocmd
: clear-autocmds
: augroup
: keymap
: opt
: g
: colorscheme}

View file

@ -1,158 +1,32 @@
{ pkgs, ... }: { pkgs, ... }:
let # let
customPlugins = { # customPlugins = {
vim-zettel = pkgs.vimUtils.buildVimPlugin { # vim-zettel = pkgs.vimUtils.buildVimPlugin {
name = "vim-zettel"; # name = "vim-zettel";
src = pkgs.fetchFromGitHub { # src = pkgs.fetchFromGitHub {
owner = "michal-h21"; # owner = "michal-h21";
repo = "vim-zettel"; # repo = "vim-zettel";
rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d"; # rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4="; # sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
}; # };
}; # };
lsp-format = pkgs.vimUtils.buildVimPlugin { # };
name = "lsp-format";
src = pkgs.fetchFromGitHub { # Thank god I don't use python anymore
owner = "lukas-reineke"; # my-python-packages = python-packages: with python-packages; [
repo = "lsp-format.nvim"; # # other python packages you want
rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff"; # ];
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4="; # python-with-my-packages = pkgs.python3.withPackages my-python-packages;
}; # in
};
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
name = "lspsaga.nvim";
src = pkgs.fetchFromGitHub {
owner = "glepnir";
repo = "lspsaga.nvim";
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
};
};
nvim-luapad = pkgs.vimUtils.buildVimPlugin {
name = "nvim-luapad";
src = pkgs.fetchFromGitHub {
owner = "rafcamlet";
repo = "nvim-luapad";
rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea";
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
};
};
leap = pkgs.vimUtils.buildVimPlugin {
name = "leap";
src = pkgs.fetchFromGitHub {
owner = "ggandor";
repo = "leap.nvim";
rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844";
sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k=";
};
};
nvim-navic = pkgs.vimUtils.buildVimPlugin {
name = "nvim-navic";
src = pkgs.fetchFromGitHub {
owner = "SmiteshP";
repo = "nvim-navic";
rev = "096b23e73c84a653fd317c0c10261875fa573a6d";
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
};
};
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "which-key.nvim";
version = "2022-05-04";
src = pkgs.fetchFromGitHub {
owner = "folke";
repo = "which-key.nvim";
rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71";
sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj";
};
meta.homepage = "https://github.com/folke/which-key.nvim/";
};
scnvim = pkgs.vimUtils.buildVimPlugin {
pname = "scnvim";
version = "2022-06-04";
src = pkgs.fetchFromGitHub {
owner = "davidgranstrom";
repo = "scnvim";
rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107";
sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc=";
};
};
yuck-vim = pkgs.vimUtils.buildVimPlugin {
pname = "yuck.vim";
version = "2021-08-09";
src = pkgs.fetchFromGitHub {
owner = "elkowar";
repo = "yuck.vim";
rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08";
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
};
};
nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
pname = "nvim-parinfer";
version = "v1.2.0";
src = pkgs.fetchFromGitHub {
owner = "gpanders";
repo = "nvim-parinfer";
rev = "82bce5798993f4fe5ced20e74003b492490b4fe8";
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
};
};
my-marks = pkgs.vimUtils.buildVimPlugin {
pname = "marks";
version = "2022-08-31";
src = pkgs.fetchFromGitHub {
owner = "chentoast";
repo = "marks.nvim";
rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0";
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
};
};
my-fterm = pkgs.vimUtils.buildVimPlugin {
pname = "fterm";
version = "2022-07-22";
src = pkgs.fetchFromGitHub {
owner = "numToStr";
repo = "FTerm.nvim";
rev = "efd10656724a269e21ba68d65e2b058a4e606424";
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
};
};
my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
pname = "nvim-peekup";
version = "0.1.0";
src = pkgs.fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "nvim-peekup";
rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3";
sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY=";
};
};
};
my-python-packages = python-packages: with python-packages; [
tasklib
pynvim
six
pylsp-mypy
#pyls-isort
#pyls-black
black
isort
# other python packages you want
];
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
in
{ {
home.sessionVariables.EDITOR = "nvim"; home.sessionVariables.EDITOR = "nvim";
home.shellAliases = { home.shellAliases = {
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD"; k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
# kitaab zettel # kitaab zettel
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD"; kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
# kitaab recents
kr = "cd /home/anish/kitaab/vimwiki; eza --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
# kitaab get by tagged # kitaab get by tagged
kt = "cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD"; kt = "cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
# List files that have no links in them
ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD";
}; };
# Add %update to the highlight clause for vimwiki files # Add %update to the highlight clause for vimwiki files
home.file.".config/nvim/after/syntax/vimwiki.vim".text = '' home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
@ -167,33 +41,8 @@ in
enable = true; enable = true;
extraConfig = '' extraConfig = ''
" so our custom files still get included
set runtimepath+=/home/anish/.config/nvim/
set tabstop=2
set showmatch
set shiftwidth=2
set noexpandtab
set autoindent
set undofile
set signcolumn=auto:4
set title
" set foldmethod=indent " fold based on indent
set number
set nocompatible
set relativenumber
set showtabline=2
set noexpandtab
set autowriteall
set list lcs=tab:\|\
filetype plugin on filetype plugin on
" include - in word to move across easier in lisp / clojure
set iskeyword+=-
set termguicolors
colorscheme ayu-mirage
" set spell " set spell
set spelllang=en_gb set spelllang=en_gb
set ignorecase set ignorecase
@ -215,59 +64,6 @@ in
" highlight row " highlight row
set cursorline set cursorline
let mapleader = "\<Space>"
let maplocalleader = ","
" window
nmap <leader>wh :topleft vnew<CR>
nmap <leader>wl :botright vnew<CR>
nmap <leader>wk :topleft new<CR>
nmap <leader>wj :botright new<CR>
" tabs
nmap <leader>rt :retab!<CR>
vmap <leader>rt :retab!<CR>
" moving splits with vim movements.
:tnoremap <A-h> <C-\><C-N><C-w>h
:tnoremap <A-j> <C-\><C-N><C-w>j
:tnoremap <A-k> <C-\><C-N><C-w>k
:tnoremap <A-l> <C-\><C-N><C-w>l
:inoremap <A-h> <C-\><C-N><C-w>h
:inoremap <A-j> <C-\><C-N><C-w>j
:inoremap <A-k> <C-\><C-N><C-w>k
:inoremap <A-l> <C-\><C-N><C-w>l
:nnoremap <A-h> <leader>h
:nnoremap <A-j> <leader>j
:nnoremap <A-k> <leader>k
:nnoremap <A-l> <leader>l
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
" tidal nvim terminal
let g:tidal_target = "terminal"
" latex
" let g:tex_flavor='latex'
" let g:vimtex_view_method='zathura'
" let g:vimtex_quickfix_mode=0
" set conceallevel=1
" let g:tex_conceal='abdmg'
" telescope
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
nnoremap <leader>ft <cmd>Telescope tags<cr>
" exit normal mode in terminal
:tnoremap <C-n> <C-\><C-n>
" Sexp in Conjure (since it's fennel)
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio" let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
" we only use fennel with love; no we don't... " we only use fennel with love; no we don't...
let g:conjure#client#fennel#stdio#command = "fennel" let g:conjure#client#fennel#stdio#command = "fennel"
@ -278,10 +74,6 @@ in
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
" general commands " general commands
map <leader>t :NERDTreeToggle<CR>
map <leader>s :w<CR>
map <leader>q :q<CR>
map <leader>r :RainbowParenthesesToggleAll<CR>
nnoremap <BS> :noh<CR> nnoremap <BS> :noh<CR>
map Q <Nop> map Q <Nop>
nnoremap Y y$ nnoremap Y y$
@ -319,16 +111,6 @@ in
nnoremap <silent> gj :BufferPick<CR> nnoremap <silent> gj :BufferPick<CR>
nnoremap <silent> gq :BufferClose<CR> nnoremap <silent> gq :BufferClose<CR>
" git
nnoremap <leader>ga :G fetch --all
nmap <leader>gs :G<CR>
nmap <leader>gl :diffget //3<CR>
nmap <leader>gh :diffget //2<CR>
nmap <leader>gb :GBranches<CR>
nnoremap <leader>gp :Git! push<CR>
nnoremap <leader>gd :Gdiff<CR>
nnoremap <leader>gc :G commit -v -q %:p<CR>
" kitaab " kitaab
map <leader>cz :VimwikiIndex<CR>:ZettelNew map <leader>cz :VimwikiIndex<CR>:ZettelNew
map <leader>zs :ZettelSearch<CR> map <leader>zs :ZettelSearch<CR>
@ -338,100 +120,16 @@ in
map <leader>wt :VimwikiMakeTomorrowDiaryNote map <leader>wt :VimwikiMakeTomorrowDiaryNote
map <leader>wd :VimwikiMakeYesterdayDiaryNote map <leader>wd :VimwikiMakeYesterdayDiaryNote
map <leader>zm :ZenMode<CR>:setlocal nospell<CR> map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }] let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 0, 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'} }]
let g:sync_taskwarrior = 0 let g:sync_taskwarrior = 0
let g:zettel_format = "%y%m%d-%H%M" let g:zettel_format = "%y%m%d-%H%M"
let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}]
let g:mapleader="\<Space>"
" fzf
" not sure we even use this
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
" lsp commands
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
" lspsaga stuff doesn't work
nnoremap <leader>vd :Lspsaga peek_definition<CR>
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
nnoremap <leader>vh :Lspsaga hover_doc<CR>
nnoremap <leader>vca :Lspsaga code_action<CR>
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
nnoremap <leader>vs :Dasht<Space>
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
nnoremap <leader>vo :LSoutlineToggle<CR>
" dashboard
let g:dashboard_custom_header = [
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\]
let g:dashboard_default_executive = 'telescope'
nmap <Leader>ss :<C-u>SessionSave<CR>
nmap <Leader>sl :<C-u>SessionLoad<CR>
" nnoremap <silent> <Leader>fh :DashboardFindHistory<CR>
" nnoremap <silent> <Leader>fm :DashboardJumpMark<CR>
" nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
let g:dashboard_custom_footer = ["Run wild"]
let g:dashboard_custom_section={
\ 'create_zettel': {
\ 'description': [' Create Zettel SPC c z'],
\ 'command': ':VimwikiIndex' },
\ 'load_session': {
\ 'description': [' Load Session SPC s l'],
\ 'command': 'SessionLoad' }
\ }
let g:scnvim_snippet_format = "luasnip" let g:scnvim_snippet_format = "luasnip"
" lua config " lua config
lua <<EOF lua <<EOF
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
vim.g.diagnostics_active = true vim.g.diagnostics_active = true
function _G.toggle_diagnostics() function _G.toggle_diagnostics()
if vim.g.diagnostics_active then if vim.g.diagnostics_active then
@ -728,7 +426,7 @@ in
local map = vim.api.nvim_set_keymap local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts) map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts) map('t', '<TAB>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
-- Custom functions -- Custom functions
function update_date() function update_date()
@ -853,20 +551,16 @@ in
EOF EOF
''; '';
extraPackages = with pkgs // customPlugins; [ extraPackages = with pkgs; [
# used to compile tree-sitter grammar # used to compile tree-sitter grammar
python-with-my-packages # python-with-my-packages
nodejs nodejs
clojure-lsp clojure-lsp
clojure clojure
nil
terraform-lsp
rust-analyzer
clj-kondo clj-kondo
zls terraform-lsp
gopls gopls
gcc gcc
nodePackages_latest.pyright
shellcheck shellcheck
proselint proselint
statix statix
@ -874,47 +568,47 @@ in
nodePackages.typescript-language-server nodePackages.typescript-language-server
luajitPackages.lua-lsp luajitPackages.lua-lsp
fennel-ls fennel-ls
starpls-bin
]; ];
plugins = with pkgs.vimPlugins // customPlugins; [ plugins = with pkgs.vimPlugins; [
# ui # ui
lualine-nvim lualine-nvim
fzf-vim fzf-vim
nerdtree
neovim-ayu
rainbow_parentheses-vim
vim-surround
vim-devicons vim-devicons
nvim-web-devicons nvim-web-devicons
undotree
telescope-nvim telescope-nvim
plenary-nvim plenary-nvim
nvim-navic nvim-navic
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ])) fterm
nvim-treesitter-context
my-fterm
barbar-nvim barbar-nvim
# TODO
# neotree
neovim-ayu
rainbow_parentheses-vim
vim-surround
undotree
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ]))
nvim-treesitter-context
auto-session auto-session
my-marks
which-key-nvim which-key-nvim
nvim-peekup
zen-mode-nvim zen-mode-nvim
twilight-nvim twilight-nvim
my-lspsaga
# TODO remove?
vim-dasht vim-dasht
# language # language
vim-nix vim-nix
vim-elixir
emmet-vim emmet-vim
csv-vim csv-vim
direnv-vim direnv-vim
zig-vim
conjure conjure
# kitaab stuff # kitaab stuff
vimwiki vimwiki
taskwiki
vim-zettel vim-zettel
hologram-nvim hologram-nvim
@ -926,6 +620,7 @@ in
cmp-nvim-lsp cmp-nvim-lsp
cmp-treesitter cmp-treesitter
nvim-lsp-ts-utils nvim-lsp-ts-utils
lspsaga
cmp-conjure cmp-conjure
cmp-buffer cmp-buffer
cmp-path cmp-path
@ -956,13 +651,12 @@ in
vim-beancount vim-beancount
# vimtex # vimtex
# custom # custom
yuck-vim
nvim-parinfer nvim-parinfer
# vim-processing # vim-processing
]; ];
withPython3 = true; # withPython3 = true;
extraPython3Packages = pkgs: with pkgs; [ tasklib six ]; # extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
vimAlias = true; # vimAlias = true;
}; };
} }