2021-10-04 08:23:05 -07:00
|
|
|
{ pkgs, ... }:
|
2021-10-10 01:34:18 -07:00
|
|
|
let
|
2022-02-25 06:04:20 -08:00
|
|
|
customPlugins = {
|
|
|
|
vim-zettel = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "vim-zettel";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "michal-h21";
|
|
|
|
repo = "vim-zettel";
|
|
|
|
rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
|
|
|
|
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-02-25 19:31:21 -08:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
my-python-packages = python-packages: with python-packages; [
|
|
|
|
tasklib
|
|
|
|
pynvim
|
|
|
|
six
|
2022-02-25 09:32:15 -08:00
|
|
|
python-lsp-server
|
|
|
|
pylsp-mypy
|
|
|
|
python-lsp-black
|
|
|
|
pylint
|
2022-02-25 06:04:20 -08:00
|
|
|
# other python packages you want
|
|
|
|
];
|
|
|
|
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
|
2021-10-10 01:34:18 -07:00
|
|
|
in
|
2022-02-25 06:04:20 -08:00
|
|
|
{
|
|
|
|
environment.variables.EDITOR = "nvim";
|
|
|
|
environment.shellAliases = {
|
|
|
|
k = "vim -c :VimwikiIndex";
|
|
|
|
kz = "vim -c :VimwikiIndex -c :ZettelNew";
|
|
|
|
};
|
|
|
|
environment.systemPackages = with pkgs // customPlugins; [
|
|
|
|
nodejs
|
|
|
|
python-with-my-packages
|
|
|
|
clojure-lsp
|
|
|
|
rnix-lsp
|
2022-02-25 09:32:15 -08:00
|
|
|
terraform-lsp
|
2022-02-25 23:24:02 -08:00
|
|
|
vale
|
|
|
|
clj-kondo
|
|
|
|
# Other LSPs or linters
|
2022-02-25 06:04:20 -08:00
|
|
|
( neovim.override {
|
|
|
|
vimAlias = true;
|
|
|
|
withPython3 = true;
|
|
|
|
extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
|
|
|
|
configure = {
|
2021-10-04 08:23:05 -07:00
|
|
|
packages.myPlugins = with pkgs.vimPlugins; {
|
|
|
|
start = [
|
2022-02-25 19:31:21 -08:00
|
|
|
# general
|
2021-10-04 08:23:05 -07:00
|
|
|
vim-nix
|
|
|
|
fzf-vim
|
|
|
|
vim-elixir
|
|
|
|
emmet-vim
|
|
|
|
nerdtree
|
2022-02-25 09:32:15 -08:00
|
|
|
ayu-vim
|
2021-10-04 08:23:05 -07:00
|
|
|
goyo-vim
|
|
|
|
csv-vim
|
|
|
|
rainbow_parentheses-vim
|
|
|
|
vim-surround
|
|
|
|
vim-devicons
|
2022-02-25 19:31:21 -08:00
|
|
|
nvim-web-devicons
|
|
|
|
direnv-vim
|
2022-02-26 00:17:38 -08:00
|
|
|
vim-peekaboo
|
|
|
|
undotree
|
2022-02-25 22:22:17 -08:00
|
|
|
telescope-nvim
|
|
|
|
plenary-nvim
|
|
|
|
lualine-nvim
|
|
|
|
nvim-gps
|
|
|
|
nvim-treesitter
|
2022-02-26 00:17:38 -08:00
|
|
|
nvim-treesitter-context
|
2022-02-25 22:22:17 -08:00
|
|
|
cmp-treesitter
|
2022-02-26 03:47:03 -08:00
|
|
|
dashboard-nvim
|
|
|
|
FTerm-nvim
|
2022-03-08 20:24:34 -08:00
|
|
|
barbar-nvim
|
2022-02-25 19:31:21 -08:00
|
|
|
|
2022-02-25 09:32:15 -08:00
|
|
|
# kitaab stuff
|
|
|
|
vimwiki
|
2021-10-04 08:23:05 -07:00
|
|
|
taskwiki
|
2021-10-10 01:34:18 -07:00
|
|
|
vim-zettel
|
2022-02-25 19:31:21 -08:00
|
|
|
|
2022-02-25 09:32:15 -08:00
|
|
|
# lsp stuff
|
2022-02-25 23:24:02 -08:00
|
|
|
nvim-lint
|
2022-02-25 09:32:15 -08:00
|
|
|
nvim-lspconfig
|
|
|
|
nvim-cmp
|
2022-02-25 10:20:07 -08:00
|
|
|
cmp-nvim-lsp
|
2022-02-25 09:32:15 -08:00
|
|
|
nvim-lsp-ts-utils
|
|
|
|
cmp-conjure
|
|
|
|
cmp-buffer
|
|
|
|
cmp-tabnine
|
|
|
|
lspkind-nvim
|
2022-02-25 19:31:21 -08:00
|
|
|
cmp-path
|
|
|
|
cmp-spell
|
|
|
|
nvim-autopairs
|
|
|
|
|
2022-02-25 09:32:15 -08:00
|
|
|
# git stuff
|
|
|
|
vim-fugitive
|
|
|
|
gitsigns-nvim
|
|
|
|
fzf-checkout-vim
|
2022-02-25 19:31:21 -08:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
# Clojure stuff
|
|
|
|
conjure
|
|
|
|
vim-sexp
|
|
|
|
vim-sexp-mappings-for-regular-people
|
2022-02-25 09:32:15 -08:00
|
|
|
# testing
|
|
|
|
#vim-processing
|
|
|
|
#vim-tidal
|
2021-10-04 08:23:05 -07:00
|
|
|
];
|
|
|
|
};
|
2022-02-25 06:04:20 -08:00
|
|
|
|
|
|
|
customRC = ''
|
|
|
|
set tabstop=2
|
|
|
|
set showmatch
|
|
|
|
set shiftwidth=2
|
|
|
|
set noexpandtab
|
|
|
|
set autoindent
|
2022-02-25 09:32:15 -08:00
|
|
|
set undofile
|
2022-02-25 22:45:12 -08:00
|
|
|
set signcolumn=auto:4
|
2022-02-25 06:04:20 -08:00
|
|
|
|
|
|
|
" set foldmethod=indent " fold based on indent
|
|
|
|
set number
|
|
|
|
set nocompatible
|
|
|
|
set relativenumber
|
|
|
|
set showtabline=2
|
|
|
|
set noexpandtab
|
|
|
|
set autowriteall
|
2021-10-04 08:23:05 -07:00
|
|
|
syntax on
|
2022-02-25 06:04:20 -08:00
|
|
|
set list lcs=tab:\|\
|
|
|
|
filetype plugin on
|
|
|
|
|
|
|
|
set termguicolors
|
|
|
|
let ayucolor="mirage"
|
|
|
|
colorscheme ayu
|
2021-10-04 08:23:05 -07:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
" set spell
|
|
|
|
set spelllang=en_gb
|
2022-02-25 19:31:21 -08:00
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
set incsearch
|
|
|
|
" if hidden is not set, TextEdit might fail.
|
|
|
|
set hidden
|
|
|
|
" Some servers have issues with backup files, see #649
|
|
|
|
set nobackup
|
|
|
|
set nowritebackup
|
|
|
|
" Better display for messages
|
|
|
|
set cmdheight=2
|
|
|
|
" You will have bad experience for diagnostic messages when it's default 4000.
|
|
|
|
set updatetime=300
|
|
|
|
" don't give |ins-completion-menu| messages.
|
|
|
|
set shortmess+=c
|
|
|
|
" always show signcolumns
|
|
|
|
set signcolumn=yes
|
2021-10-04 08:23:05 -07:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
" window
|
2022-02-25 06:55:19 -08:00
|
|
|
nmap <leader>wh :topleft vnew<CR>
|
2022-02-25 06:04:20 -08:00
|
|
|
nmap <leader>wl :botright vnew<CR>
|
2022-02-25 06:55:19 -08:00
|
|
|
nmap <leader>wk :topleft new<CR>
|
2022-02-25 06:04:20 -08:00
|
|
|
nmap <leader>wj :botright new<CR>
|
2022-02-08 02:03:49 -08:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
" tabs
|
|
|
|
nmap <leader>rt :retab!<CR>
|
2021-10-04 08:23:05 -07:00
|
|
|
|
|
|
|
let mapleader = "\<Space>"
|
2022-02-25 06:04:20 -08:00
|
|
|
let maplocalleader = ","
|
2021-10-04 08:23:05 -07:00
|
|
|
|
|
|
|
" 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:")
|
|
|
|
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M:")
|
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
" 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>
|
2022-02-25 19:31:21 -08:00
|
|
|
nnoremap <leader>ft <cmd>Telescope tags<cr>
|
2022-02-08 02:03:49 -08:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
" exit normal mode in terminal
|
|
|
|
:tnoremap <C-n> <C-\><C-n>
|
2021-10-04 08:23:05 -07:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
" Sexp in Conjure (since it's fennel)
|
|
|
|
" let g:sexp_filetypes = [ "fennel" ]
|
2021-10-10 01:34:18 -07:00
|
|
|
|
2022-02-25 06:04:20 -08:00
|
|
|
let g:rainbow_active = 0
|
2022-02-25 19:31:21 -08:00
|
|
|
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
|
2021-10-04 08:23:05 -07:00
|
|
|
|
2022-02-25 06:55:19 -08:00
|
|
|
" general commands
|
2021-10-04 08:23:05 -07:00
|
|
|
map <leader>t :NERDTreeToggle<CR>
|
|
|
|
map <leader>s :w<CR>
|
|
|
|
map <leader>q :wq<CR>
|
2022-02-25 06:04:20 -08:00
|
|
|
map <leader>r :RainbowParenthesesToggleAll<CR>
|
2022-02-25 06:55:19 -08:00
|
|
|
map <leader><BS> :noh<CR>
|
2022-02-25 07:58:16 -08:00
|
|
|
nnoremap Y y$
|
|
|
|
" center moving
|
|
|
|
nnoremap n nzzzv
|
|
|
|
nnoremap N Nzzzv
|
|
|
|
nnoremap J mzJ'z
|
|
|
|
" undo points
|
|
|
|
inoremap , ,<c-g>u
|
|
|
|
inoremap . .<c-g>u
|
|
|
|
inoremap ! !<c-g>u
|
|
|
|
inoremap ? ?<c-g>u
|
|
|
|
inoremap ( (<c-g>u
|
|
|
|
inoremap ) )<c-g>u
|
|
|
|
inoremap [ [<c-g>u
|
|
|
|
inoremap ] ]<c-g>u
|
|
|
|
inoremap { {<c-g>u
|
|
|
|
inoremap } }<c-g>u
|
|
|
|
" moving text
|
|
|
|
vnoremap J :m '>+1<CR>gv=gv
|
|
|
|
vnoremap K :m '>-2<CR>gv=gv
|
|
|
|
inoremap <c-j> <esc>:m .+1<CR>==
|
|
|
|
inoremap <c-k> <esc>:m .-2<CR>==
|
|
|
|
nnoremap <leader>j <esc>:m .+1<CR>==
|
|
|
|
nnoremap <leader>k <esc>:m .-2<CR>==
|
2022-02-25 09:32:15 -08:00
|
|
|
" Pasting
|
|
|
|
:map <leader>sy :!xclip -i<CR><CR>
|
|
|
|
:vmap <leader>sy "*y
|
|
|
|
:map <leader>sp :r!xclip -o<CR>
|
2022-02-25 06:55:19 -08:00
|
|
|
|
2022-03-08 20:24:34 -08:00
|
|
|
" barbar
|
|
|
|
nnoremap <silet> gT :BufferPrevious<CR>
|
|
|
|
nnoremap <silet> gt :BufferNext<CR>
|
|
|
|
nnoremap <silet> gj :BufferPick<CR>
|
|
|
|
nnoremap <silet> gc :BufferClose<CR>
|
|
|
|
|
2022-02-25 06:55:19 -08:00
|
|
|
" git
|
2022-02-25 07:58:16 -08:00
|
|
|
nnoremap <leader>ga :G fetch --all
|
2022-02-25 06:55:19 -08:00
|
|
|
nmap <leader>gs :G<CR>
|
|
|
|
nmap <leader>gh :diffget //3
|
|
|
|
nmap <leader>gl :diffget //2
|
2022-03-08 20:24:34 -08:00
|
|
|
nmap <leader>gc :GBranches<CR>
|
2022-02-26 03:47:03 -08:00
|
|
|
nnoremap <leader>gp :G push<CR>
|
2022-02-25 06:55:19 -08:00
|
|
|
|
|
|
|
" kitaab
|
2022-02-25 06:04:20 -08:00
|
|
|
map <leader>zs :ZettelSearch<CR>
|
|
|
|
map <leader>zo :ZettelOpen<CR>
|
|
|
|
map <leader>zn :ZettelNew<CR>
|
2021-10-04 08:23:05 -07:00
|
|
|
|
2022-02-26 03:47:03 -08:00
|
|
|
let g:mapleader="\<Space>"
|
|
|
|
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>ff :DashboardFindFile<CR>
|
|
|
|
nnoremap <silent> <Leader>fa :DashboardFindWord<CR>
|
2022-03-08 20:24:34 -08:00
|
|
|
nnoremap <silent> <Leader>fm :DashboardJumpMark<CR>
|
2022-02-26 03:47:03 -08:00
|
|
|
nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
|
2022-03-08 20:24:34 -08:00
|
|
|
nnoremap <silent> <Leader>tn :tabnew<CR>
|
2022-02-26 03:47:03 -08:00
|
|
|
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
|
2021-10-04 08:23:05 -07:00
|
|
|
|
2022-02-25 06:55:19 -08:00
|
|
|
" fzf
|
|
|
|
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
|
|
|
|
|
2022-02-25 09:32:15 -08:00
|
|
|
" lsp commands
|
|
|
|
nnoremap <leader>vd :lua vim.lsp.buf.definition()<CR>
|
|
|
|
nnoremap <leader>vi :lua vim.lsp.buf.implementation()<CR>
|
|
|
|
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
|
|
|
|
nnoremap <leader>vrr :lua vim.lsp.buf.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.diagnostic.show_line_diagnostics(); vim.lsp.util.show_line_diagnostics()<CR>
|
|
|
|
nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
|
|
|
|
nnoremap <leader>vll :call LspLocationList()<CR>
|
|
|
|
|
|
|
|
" lua config
|
|
|
|
lua <<EOF
|
2022-02-25 22:22:17 -08:00
|
|
|
-- autopairs
|
|
|
|
require('nvim-autopairs').setup{}
|
|
|
|
|
2022-02-25 10:50:52 -08:00
|
|
|
-- Setup nvim-cmp.
|
2022-02-25 19:31:21 -08:00
|
|
|
local cmp = require('cmp')
|
2022-02-25 19:52:14 -08:00
|
|
|
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
2022-02-25 19:31:21 -08:00
|
|
|
local t = function(str)
|
2022-02-26 03:47:03 -08:00
|
|
|
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
2022-02-25 19:31:21 -08:00
|
|
|
end
|
|
|
|
local check_back_space = function()
|
2022-02-26 03:47:03 -08:00
|
|
|
local col = vim.fn.col(".") - 1
|
|
|
|
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil
|
2022-02-25 19:31:21 -08:00
|
|
|
end
|
|
|
|
cmp.setup {
|
2022-02-26 03:47:03 -08:00
|
|
|
formatting = {
|
|
|
|
format = function(entry, vim_item)
|
|
|
|
-- fancy icons and a name of kind
|
|
|
|
vim_item.kind = require("lspkind").presets.default[vim_item.kind] ..
|
|
|
|
" " .. vim_item.kind
|
|
|
|
-- set a name for each source
|
|
|
|
vim_item.menu = ({
|
|
|
|
buffer = "[Buffer]",
|
|
|
|
nvim_lsp = "[LSP]",
|
|
|
|
cmp_tabnine = "[TabNine]",
|
|
|
|
look = "[Look]",
|
|
|
|
path = "[Path]",
|
|
|
|
spell = "[Spell]",
|
|
|
|
calc = "[Calc]",
|
|
|
|
})[entry.source.name]
|
|
|
|
return vim_item
|
|
|
|
end
|
|
|
|
},
|
|
|
|
mapping = {
|
|
|
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
|
|
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
|
|
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
|
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
|
|
['<C-Space>'] = cmp.mapping.complete(),
|
|
|
|
['<C-e>'] = cmp.mapping.close(),
|
|
|
|
['<CR>'] = cmp.mapping.confirm({
|
|
|
|
behavior = cmp.ConfirmBehavior.Insert,
|
|
|
|
select = true
|
|
|
|
}),
|
|
|
|
["<Tab>"] = cmp.mapping(function(fallback)
|
|
|
|
if cmp.visible() then
|
|
|
|
cmp.select_next_item()
|
|
|
|
else
|
|
|
|
fallback()
|
|
|
|
end
|
|
|
|
end, {"i", "s"}),
|
|
|
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
|
|
if cmp.visible() then
|
|
|
|
cmp.select_prev_item()
|
|
|
|
else
|
|
|
|
fallback()
|
|
|
|
end
|
|
|
|
end, { "i", "s" }),
|
|
|
|
},
|
|
|
|
sources = {
|
|
|
|
{name = 'buffer'}, {name = 'nvim_lsp'},
|
|
|
|
{name = "look"}, {name = "path"},
|
|
|
|
{name = 'cmp_tabnine'}, {name = "calc"}, {name = "spell"},
|
|
|
|
{name = 'cmp-conjure'}
|
|
|
|
},
|
|
|
|
completion = {completeopt = 'menu,menuone,noinsert'}
|
2022-02-25 19:31:21 -08:00
|
|
|
}
|
2022-02-25 19:52:14 -08:00
|
|
|
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
|
2022-02-25 19:31:21 -08:00
|
|
|
-- TabNine cmp
|
|
|
|
local tabnine = require('cmp_tabnine.config')
|
|
|
|
tabnine:setup({max_lines = 1000, max_num_results = 20, sort = true})
|
2022-02-25 10:50:52 -08:00
|
|
|
|
|
|
|
-- Setup lspconfig.
|
2022-02-25 19:31:21 -08:00
|
|
|
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
2022-02-25 22:22:17 -08:00
|
|
|
require('lspconfig').clojure_lsp.setup {}
|
2022-02-25 20:09:11 -08:00
|
|
|
require('lspconfig').rnix.setup {}
|
|
|
|
require('lspconfig').pylsp.setup {}
|
|
|
|
require('lspconfig').terraform_lsp.setup {}
|
2022-02-25 10:50:52 -08:00
|
|
|
|
2022-02-25 22:45:12 -08:00
|
|
|
require('gitsigns').setup { sign_priority=80 }
|
2022-02-25 20:09:11 -08:00
|
|
|
|
2022-02-25 22:42:37 -08:00
|
|
|
-- treesitter
|
2022-02-25 22:48:43 -08:00
|
|
|
require('nvim-treesitter.configs').setup { ensure_installed={'nix', 'clojure', 'python', 'typescript'}}
|
2022-02-25 22:42:37 -08:00
|
|
|
|
2022-02-25 22:22:17 -08:00
|
|
|
-- lualine
|
2022-02-25 22:42:37 -08:00
|
|
|
require('nvim-gps').setup {}
|
2022-02-25 22:22:17 -08:00
|
|
|
local gps = require('nvim-gps')
|
|
|
|
require('lualine').setup {
|
2022-02-26 03:47:03 -08:00
|
|
|
sections = {
|
|
|
|
lualine_c = {
|
|
|
|
'filename', { gps.get_location, condition=gps.is_available },
|
|
|
|
},
|
|
|
|
lualine_y = {
|
|
|
|
function()
|
|
|
|
local msg = 'No Active Lsp'
|
|
|
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
|
|
|
local clients = vim.lsp.get_active_clients()
|
|
|
|
if next(clients) == nil then
|
|
|
|
return msg
|
|
|
|
end
|
|
|
|
for _, client in ipairs(clients) do
|
|
|
|
local filetypes = client.config.filetypes
|
|
|
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
|
|
|
return client.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return msg
|
|
|
|
end
|
|
|
|
},
|
|
|
|
}
|
2022-02-25 22:22:17 -08:00
|
|
|
}
|
|
|
|
|
2022-02-25 23:24:02 -08:00
|
|
|
-- nvim-lint
|
|
|
|
require('lint').linters_by_ft = {
|
2022-02-26 03:47:03 -08:00
|
|
|
markdown = {'vale'},
|
|
|
|
clojure = {'clj-kondo'},
|
|
|
|
python = {'black'}
|
2022-02-25 23:24:02 -08:00
|
|
|
}
|
|
|
|
|
2022-02-26 03:47:03 -08:00
|
|
|
-- f_term
|
|
|
|
local map = vim.api.nvim_set_keymap
|
|
|
|
local opts = { noremap = true, silent = true }
|
|
|
|
map('n', '<C-i>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
|
|
|
|
map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
|
2022-02-25 10:50:52 -08:00
|
|
|
EOF
|
2021-10-04 08:23:05 -07:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)];
|
|
|
|
}
|