nvim: Use fennel instead of lua
This commit is contained in:
parent
7d7b0c3a3f
commit
954f8df49e
64 changed files with 997 additions and 1441 deletions
119
config/nvim/init.fnl
Normal file
119
config/nvim/init.fnl
Normal file
|
@ -0,0 +1,119 @@
|
|||
(let [o vim.opt
|
||||
g vim.g]
|
||||
;; Preamble
|
||||
(vim.cmd "syntax enable")
|
||||
(vim.cmd "filetype plugin indent on")
|
||||
(set o.compatible false)
|
||||
(set o.hidden true)
|
||||
(set o.shell :/bin/sh)
|
||||
;; Various Options
|
||||
(set o.encoding :utf-8)
|
||||
(set o.autoread true)
|
||||
(set o.spelllang [:en :de])
|
||||
(set o.showmode false)
|
||||
(set o.modeline false)
|
||||
(set o.ruler false)
|
||||
(set o.ttyfast true)
|
||||
(set o.lazyredraw true)
|
||||
(set o.cursorline true)
|
||||
(set o.list true)
|
||||
(set o.listchars {:tab "»·"
|
||||
:trail "·"
|
||||
:nbsp "·"
|
||||
:precedes "←"
|
||||
:extends "→"})
|
||||
(set o.showbreak "↪ ")
|
||||
(set o.backspace [:indent :eol :start])
|
||||
(set o.showtabline 2)
|
||||
(set o.signcolumn "yes:1")
|
||||
(set o.wildoptions :pum)
|
||||
(set o.completeopt [:menu :menuone :noselect])
|
||||
(set o.startofline false)
|
||||
(set o.synmaxcol 300)
|
||||
(set o.viewoptions [:cursor :folds :slash :unix])
|
||||
(set o.foldenable false)
|
||||
;; Search
|
||||
(set o.incsearch true)
|
||||
(set o.grepprg "rg --vimgrep --no-heading")
|
||||
(set o.grepformat "%f:%l:%c:%m,%f:%l:%m")
|
||||
(set o.inccommand :nosplit)
|
||||
;; Wrap
|
||||
(set o.wrap true)
|
||||
(set o.tabstop 2)
|
||||
(set o.shiftwidth 2)
|
||||
(set o.softtabstop 2)
|
||||
(set o.expandtab true)
|
||||
;; Splits
|
||||
(set o.splitbelow true)
|
||||
(set o.splitright true)
|
||||
;; Diff
|
||||
(set o.diffopt [:filler :internal "algorithm:histogram" :indent-heuristic])
|
||||
;; UI
|
||||
(set o.number true)
|
||||
(set o.relativenumber true)
|
||||
(set o.conceallevel 2)
|
||||
(set o.concealcursor :nc)
|
||||
(set o.updatetime 750)
|
||||
(set g.cursorhold_updatetime 100) ; https://github.com/antoinemadec/FixCursorHold.nvim
|
||||
(o.shortmess:append :c)
|
||||
(o.shortmess:remove :S)
|
||||
(set o.termguicolors true)
|
||||
(set o.mouse :a)
|
||||
(set o.mousemodel :popup_setpos)
|
||||
;; Backups
|
||||
(set o.backup false)
|
||||
(set o.swapfile false)
|
||||
(set o.undofile true)
|
||||
(set o.undodir (.. (os.getenv :HOME) :/.local/share/nvim/undo//))
|
||||
;; Clipboard
|
||||
(set g.clipboard {:name :pbcopy
|
||||
:copy {:+ :pbcopy :* :pbcopy}
|
||||
:paste {:+ :pbpaste :* :pbpaste}
|
||||
:cache_enabled 0})
|
||||
(o.clipboard:prepend :unnamedplus)
|
||||
;; Plugins
|
||||
(set g.did_load_filetypes 1) ; Lua filetype detection
|
||||
(set g.do_filetype_lua 1)
|
||||
(set g.loaded_python_provider 0) ; Disable built-in providers
|
||||
(set g.loaded_python3_provider 0)
|
||||
(set g.loaded_ruby_provider 0)
|
||||
(set g.loaded_node_provider 0)
|
||||
(set g.loaded_perl_provider 0)
|
||||
(set g.loaded_matchit 1) ; Disable built-in plugins
|
||||
(set g.loaded_matchparen 1)
|
||||
(set g.loaded_gzip 1)
|
||||
(set g.loaded_rrhelper 1)
|
||||
(set g.loaded_tarPlugin 1)
|
||||
(set g.loaded_zipPlugin 1)
|
||||
(set g.loaded_netrwPlugin 1)
|
||||
(set g.loaded_netrwFileHandlers 1)
|
||||
(set g.loaded_netrwSettings 1)
|
||||
(set g.loaded_2html_plugin 1)
|
||||
(set g.loaded_vimballPlugin 1)
|
||||
(set g.loaded_getscriptPlugin 1)
|
||||
(set g.loaded_logipat 1)
|
||||
(set g.loaded_tutor_mode_plugin 1)
|
||||
(let [diagnostics (require :nifoc.diagnostic)]
|
||||
(diagnostics.setup))
|
||||
(require :configuration.plugins)
|
||||
;; Theme
|
||||
(set o.background :dark)
|
||||
(vim.cmd "colorscheme dracula")
|
||||
;; Keymap
|
||||
(let [keymap (require :nifoc.keymap)]
|
||||
(keymap.setup))
|
||||
;; Autocmds
|
||||
(let [augroup (vim.api.nvim_create_augroup :NifocInit {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd
|
||||
ls (require :nifoc.line-style)]
|
||||
(aucmd :InsertEnter {:callback #(ls.maybe-set-relativenumber false)
|
||||
:group augroup})
|
||||
(aucmd :InsertLeave {:callback #(ls.maybe-set-relativenumber true)
|
||||
:group augroup})
|
||||
(aucmd :TermOpen {:callback (fn []
|
||||
(vim.opt_local.number false)
|
||||
(vim.opt_local.relativenumber false))
|
||||
:group augroup})
|
||||
(aucmd :TextYankPost {:callback #(vim.highlight.on_yank {:higroup :IncSearch
|
||||
:timeout 500})
|
||||
:group augroup})))
|
|
@ -1,10 +0,0 @@
|
|||
local npairs = require('nvim-autopairs')
|
||||
|
||||
npairs.setup({
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
javascript = { 'string', 'template_string' },
|
||||
elixir = { 'string' },
|
||||
lua = { 'string', 'source' },
|
||||
},
|
||||
})
|
|
@ -1,23 +0,0 @@
|
|||
require('bufferline').setup{
|
||||
options = {
|
||||
show_close_icon = false,
|
||||
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
if context.buffer:current() then
|
||||
return ''
|
||||
end
|
||||
|
||||
return " (" .. count .. ")"
|
||||
end,
|
||||
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "File Explorer",
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
require('Comment').setup {
|
||||
padding = true,
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
local lspkind = require('lspkind')
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
|
||||
-- Helper functions
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') == nil
|
||||
end
|
||||
|
||||
cmp.setup {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lua' },
|
||||
}, {
|
||||
{ name = 'treesitter' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}),
|
||||
|
||||
mapping = {
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
|
||||
['<Tab>'] = cmp.mapping({
|
||||
c = function()
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Insert })
|
||||
else
|
||||
cmp.complete()
|
||||
end
|
||||
end,
|
||||
|
||||
i = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
|
||||
s = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
}),
|
||||
|
||||
['<S-Tab>'] = cmp.mapping({
|
||||
c = function()
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
|
||||
else
|
||||
cmp.complete()
|
||||
end
|
||||
end,
|
||||
|
||||
i = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
|
||||
s = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
}),
|
||||
|
||||
['<C-Space>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
}),
|
||||
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
|
||||
completion = {
|
||||
keyword_length = 2,
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
},
|
||||
|
||||
documentation = {
|
||||
border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' },
|
||||
},
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
|
||||
formatting = {
|
||||
format = lspkind.cmp_format(),
|
||||
},
|
||||
}
|
||||
|
||||
cmp.setup.cmdline('/', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp_document_symbol' }
|
||||
}, {
|
||||
{ name = 'buffer' }
|
||||
})
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
|
@ -1,13 +0,0 @@
|
|||
vim.diagnostic.config({
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
source = false,
|
||||
},
|
||||
signs = false,
|
||||
update_in_insert = false,
|
||||
})
|
||||
|
||||
vim.cmd('sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl=')
|
||||
vim.cmd('sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl=')
|
||||
vim.cmd('sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl=')
|
||||
vim.cmd('sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl=')
|
|
@ -1,7 +0,0 @@
|
|||
local fterm = require('FTerm')
|
||||
|
||||
fterm.setup {
|
||||
cmd = 'fish',
|
||||
|
||||
border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' },
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
local ns = require('nifoc.utils.statusline')
|
||||
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = {hl = 'GitSignsAdd', text = '│', numhl='GitSignsAddNr', linehl='GitSignsAddLn'},
|
||||
change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
},
|
||||
numhl = false,
|
||||
linehl = false,
|
||||
status_formatter = ns.gitsigns_formatter,
|
||||
diff_opts = {
|
||||
internal = true,
|
||||
},
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
vim.g.Illuminate_ftblacklist = {
|
||||
'minimap',
|
||||
'netrw',
|
||||
'NvimTree',
|
||||
'packer',
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
require('indent_blankline').setup {
|
||||
char = '¦',
|
||||
show_first_indent_level = false,
|
||||
use_treesitter = true,
|
||||
show_current_context = true,
|
||||
|
||||
context_patterns = {
|
||||
'class',
|
||||
'function',
|
||||
'method',
|
||||
'do_block',
|
||||
'stab_clause',
|
||||
},
|
||||
|
||||
buftype_exclude = {
|
||||
'help',
|
||||
'nofile',
|
||||
'terminal',
|
||||
},
|
||||
|
||||
filetype_exclude = {
|
||||
'minimap',
|
||||
'packer',
|
||||
},
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
require('leap').set_default_keymaps()
|
|
@ -1,156 +0,0 @@
|
|||
local lsp = require('lspconfig')
|
||||
local lsp_status = require('lsp-status')
|
||||
local diagnostic_utils = require('nifoc.utils.diagnostic')
|
||||
|
||||
local function custom_attach(client, bufnr)
|
||||
-- Plugin attachments
|
||||
|
||||
if client.resolved_capabilities.document_symbol then
|
||||
lsp_status.on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
require('illuminate').on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
if client.resolved_capabilities.code_lens then
|
||||
require('virtualtypes').on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
diagnostic_utils.maybe_enable_lsp(client, bufnr)
|
||||
diagnostic_utils.maybe_enable_fixer(client, bufnr)
|
||||
end
|
||||
|
||||
local function custom_attach_no_format(client, bufnr)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
custom_attach(client, bufnr)
|
||||
end
|
||||
|
||||
-- Setup
|
||||
lsp_status.config({
|
||||
current_function = true,
|
||||
show_filename = false,
|
||||
diagnostics = false,
|
||||
})
|
||||
|
||||
lsp_status.register_progress()
|
||||
|
||||
-- Default configuration
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
capabilities = vim.tbl_extend('keep', capabilities, lsp_status.capabilities)
|
||||
|
||||
local flags = {
|
||||
allow_incremental_sync = true,
|
||||
debounce_text_changes = 700,
|
||||
}
|
||||
|
||||
local default_config = {
|
||||
on_attach = custom_attach,
|
||||
capabilities = capabilities,
|
||||
flags = flags,
|
||||
}
|
||||
|
||||
local default_servers = {
|
||||
'bashls',
|
||||
'cssls',
|
||||
'dockerls',
|
||||
'erlangls',
|
||||
'eslint',
|
||||
'html',
|
||||
'rnix',
|
||||
'sqls',
|
||||
'taplo',
|
||||
'yamlls'
|
||||
}
|
||||
|
||||
for _, name in ipairs(default_servers) do
|
||||
lsp[name].setup(default_config)
|
||||
end
|
||||
|
||||
-- Default configuration without formatting
|
||||
|
||||
local default_servers_no_formatting = {}
|
||||
|
||||
for _, name in ipairs(default_servers_no_formatting) do
|
||||
lsp[name].setup(vim.tbl_extend('force', default_config, {
|
||||
on_attach = custom_attach_no_format,
|
||||
}))
|
||||
end
|
||||
|
||||
-- Custom configuration
|
||||
|
||||
lsp.elixirls.setup(vim.tbl_extend('force', default_config, {
|
||||
cmd = { 'elixir-ls' },
|
||||
}))
|
||||
|
||||
lsp.tsserver.setup(vim.tbl_extend('force', default_config, {
|
||||
cmd = { 'typescript-language-server', '--stdio', '--tsserver-path', 'tsserver'},
|
||||
on_attach = custom_attach_no_format,
|
||||
}))
|
||||
|
||||
lsp.jsonls.setup(vim.tbl_extend('force', default_config, {
|
||||
cmd = { 'vscode-json-language-server', '--stdio' },
|
||||
}))
|
||||
|
||||
lsp.solargraph.setup(vim.tbl_extend('force', default_config, {
|
||||
settings = {
|
||||
solargraph = {
|
||||
diagnostics = true,
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
lsp.sumneko_lua.setup(vim.tbl_extend('force', default_config, {
|
||||
cmd = { 'lua-language-server' },
|
||||
root_dir = lsp.util.root_pattern("init.vim", "init.lua", ".git") or vim.loop.os_homedir(),
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = vim.split(package.path, ';'),
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {'vim', 'use'},
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
||||
},
|
||||
},
|
||||
telemetry = {enable = false},
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
-- Custom handlers
|
||||
vim.lsp.handlers['window/showMessage'] = function(_, result, ctx, _)
|
||||
local client_id = ctx.client_id
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
local client_name = client and client.name or string.format("id=%d", client_id)
|
||||
|
||||
if not client then
|
||||
local error_msg = "LSP client has shut down after sending the message"
|
||||
|
||||
vim.notify(error_msg, "error", {
|
||||
title = 'LSP | ' .. client_name,
|
||||
timeout = 10000,
|
||||
})
|
||||
else
|
||||
local message_type = result.type
|
||||
local message_type_name = ({
|
||||
'ERROR',
|
||||
'WARN',
|
||||
'INFO',
|
||||
'DEBUG',
|
||||
})[message_type]
|
||||
local message = result.message
|
||||
|
||||
vim.notify(message, message_type_name, {
|
||||
title = 'LSP | ' .. client_name,
|
||||
timeout = 10000,
|
||||
})
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
require('trouble').setup {
|
||||
action_keys = {
|
||||
previous = "<Up>",
|
||||
next = "<Down>",
|
||||
},
|
||||
use_diagnostic_signs = true
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
local ns = require('nifoc.utils.statusline')
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
globalstatus = true,
|
||||
theme = 'dracula-nvim',
|
||||
section_separators = '',
|
||||
component_separators = '|',
|
||||
icons_enabled = true,
|
||||
},
|
||||
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {
|
||||
'b:gitsigns_status',
|
||||
{
|
||||
'diagnostics',
|
||||
sources = {'nvim_diagnostic'},
|
||||
symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '}
|
||||
},
|
||||
},
|
||||
lualine_c = {ns.current_function},
|
||||
|
||||
lualine_x = {'filetype', ns.lsp_enabled, ns.treesitter_enabled, ns.fixer_enabled, ns.spell_enabled},
|
||||
lualine_y = {ns.current_line_percent},
|
||||
lualine_z = {ns.line_column},
|
||||
},
|
||||
|
||||
extensions = { 'nvim-tree' },
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
vim.g.matchup_matchparen_deferred = true
|
||||
|
||||
vim.g.matchup_matchparen_offscreen = {
|
||||
method = 'popup',
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
require('neogit').setup({
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
section = { "", "" },
|
||||
item = { "", "" },
|
||||
hunk = { "", "" },
|
||||
},
|
||||
})
|
|
@ -1,25 +0,0 @@
|
|||
local null_ls = require('null-ls')
|
||||
local builtins = null_ls.builtins
|
||||
local diagnostic_utils = require('nifoc.utils.diagnostic')
|
||||
|
||||
null_ls.setup({
|
||||
debounce = 700,
|
||||
|
||||
sources = {
|
||||
builtins.formatting.fish_indent,
|
||||
builtins.formatting.shfmt.with({extra_args = { '-i', '2' }}),
|
||||
|
||||
builtins.diagnostics.credo,
|
||||
builtins.diagnostics.hadolint,
|
||||
builtins.diagnostics.shellcheck.with({extra_args = { '-f', 'gcc', '-x' }}),
|
||||
builtins.diagnostics.statix,
|
||||
|
||||
builtins.code_actions.shellcheck,
|
||||
builtins.code_actions.statix,
|
||||
},
|
||||
|
||||
on_attach = function(client, bufnr)
|
||||
diagnostic_utils.maybe_enable_lsp(client, bufnr)
|
||||
diagnostic_utils.maybe_enable_fixer(client, bufnr)
|
||||
end,
|
||||
})
|
|
@ -1,29 +0,0 @@
|
|||
require('nvim-tree').setup {
|
||||
open_on_setup = false,
|
||||
|
||||
update_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true
|
||||
},
|
||||
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
timeout = 500,
|
||||
},
|
||||
}
|
||||
|
||||
vim.g.nvim_tree_quit_on_open = 0
|
||||
vim.g.nvim_tree_respect_buf_cwd = 1
|
||||
vim.g.nvim_tree_git_hl = 1
|
||||
vim.g.nvim_tree_show_icons = {
|
||||
git = 1,
|
||||
folders = 1,
|
||||
files = 1,
|
||||
}
|
||||
|
||||
-- Autocmds
|
||||
local augroup_nifoc_tree = vim.api.nvim_create_augroup("NifocTree", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("User", { pattern = "TelescopeFindPre", command = 'NvimTreeClose', group = augroup_nifoc_tree })
|
|
@ -1,17 +0,0 @@
|
|||
require('project_nvim').setup {
|
||||
detection_methods = { "pattern", "lsp" },
|
||||
|
||||
patterns = {
|
||||
".git",
|
||||
"_darcs",
|
||||
".hg",
|
||||
".bzr",
|
||||
".svn",
|
||||
".gitlab-ci.yml",
|
||||
"flake.nix",
|
||||
"init.lua",
|
||||
"Makefile",
|
||||
"mix.exs",
|
||||
"package.json",
|
||||
},
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
local telescope = require('telescope')
|
||||
local actions = require('telescope.actions')
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
prompt_prefix = ' ',
|
||||
selection_caret = ' ',
|
||||
set_env = { ['COLORTERM'] = 'truecolor' },
|
||||
|
||||
layout_strategy = 'horizontal',
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
preview_width = 0.50,
|
||||
},
|
||||
},
|
||||
|
||||
path_display = {'smart', 'absolute'},
|
||||
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
telescope.load_extension("zf-native")
|
||||
telescope.load_extension("ui-select")
|
||||
|
||||
-- Autocmds
|
||||
local augroup_nifoc_telescope = vim.api.nvim_create_augroup("NifocTelescope", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", { pattern = "TelescopePrompt", callback = function()
|
||||
vim.opt_local.cursorline = false
|
||||
end, group = augroup_nifoc_telescope })
|
||||
|
||||
vim.api.nvim_create_autocmd("User" , { pattern = "TelescopePreviewerLoaded", command = "let w:is_telescope=v:true", group = augroup_nifoc_telescope })
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWinEnter" , { callback = function()
|
||||
if vim.w.is_telescope then
|
||||
vim.opt_local.number = true
|
||||
vim.opt_local.relativenumber = false
|
||||
vim.opt_local.wrap = true
|
||||
end
|
||||
end, group = augroup_nifoc_telescope })
|
|
@ -1,3 +0,0 @@
|
|||
-- dracula
|
||||
|
||||
vim.g.dracula_show_end_of_buffer = false
|
|
@ -1,3 +0,0 @@
|
|||
require('todo-comments').setup {
|
||||
signs = false,
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
local treesitter = require('nvim-treesitter')
|
||||
local treesitter_config = require('nvim-treesitter.configs')
|
||||
|
||||
-- Custom module
|
||||
treesitter.define_modules {
|
||||
nifoc_hooks = {
|
||||
enable = false,
|
||||
attach = function(bufnr)
|
||||
vim.api.nvim_buf_set_var(bufnr, 'nifoc_treesitter_enabled', 1)
|
||||
end,
|
||||
detach = function(bufnr)
|
||||
vim.api.nvim_buf_set_var(bufnr, 'nifoc_treesitter_enabled', 0)
|
||||
end,
|
||||
is_supported = function()
|
||||
return true
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
treesitter_config.setup {
|
||||
ensure_installed = 'maintained',
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@conditional.outer",
|
||||
["ic"] = "@conditional.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
matchup = {enable = true},
|
||||
autopairs = {enable = true},
|
||||
autotag = {enable = true},
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
enable_autocmd = false,
|
||||
},
|
||||
playground = {enable = true},
|
||||
nifoc_hooks = {enable = true},
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
require('virt-column').setup()
|
|
@ -1,20 +0,0 @@
|
|||
require('visual-eof').setup {
|
||||
text_EOL = '↵',
|
||||
text_NOEOL = '✗↵',
|
||||
ft_ng = {
|
||||
'fugitive.*',
|
||||
'git.*',
|
||||
'LspTrouble',
|
||||
'minimap',
|
||||
'netrw',
|
||||
'NvimTree',
|
||||
'packer',
|
||||
'TelescopePrompt',
|
||||
};
|
||||
buf_filter = function(bufnr)
|
||||
local disable_buftypes = {'terminal', 'nofile'}
|
||||
local buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype')
|
||||
|
||||
return not vim.tbl_contains(disable_buftypes, buftype)
|
||||
end;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
require('which-key').setup {}
|
|
@ -1,5 +0,0 @@
|
|||
vim.g.yoinkIncludeDeleteOperations = 1
|
||||
|
||||
vim.cmd('packadd! vim-cutlass')
|
||||
vim.cmd('packadd! vim-yoink')
|
||||
vim.cmd('packadd! vim-subversive')
|
|
@ -1,215 +0,0 @@
|
|||
local wk = require('which-key')
|
||||
|
||||
local npairs = require('nvim-autopairs')
|
||||
local fterm = require("FTerm")
|
||||
|
||||
local telescope = require('telescope')
|
||||
local telescope_builtin = require('telescope.builtin')
|
||||
local telescope_themes = require('telescope.themes')
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
vim.keymap.set('n', '<space>', '<nop>', {noremap = true})
|
||||
vim.g.mapleader = ' '
|
||||
vim.opt.timeoutlen = 500
|
||||
|
||||
-- <leader> mappings
|
||||
local leader = {
|
||||
n = {
|
||||
"<cmd>NvimTreeToggle<CR>",
|
||||
"Toggle nvim-tree"
|
||||
},
|
||||
o = {
|
||||
function() require('nifoc.utils.telescope').project_files() end,
|
||||
"Find Files"
|
||||
},
|
||||
s = {
|
||||
function() telescope_builtin.live_grep(telescope_themes.get_ivy()) end,
|
||||
"Live Grep"
|
||||
},
|
||||
["ut"] = {
|
||||
"<cmd>UndotreeToggle<CR>",
|
||||
"Undotree"
|
||||
},
|
||||
f = {
|
||||
name = "file",
|
||||
n = {
|
||||
"<cmd>enew<cr>",
|
||||
"New File"
|
||||
},
|
||||
},
|
||||
b = {
|
||||
name = "buffer",
|
||||
l = {
|
||||
function() telescope_builtin.buffers(telescope_themes.get_dropdown()) end,
|
||||
"List Buffers"
|
||||
},
|
||||
n = {
|
||||
"<cmd>BufferLineCycleNext<CR>",
|
||||
"Next Buffer"
|
||||
},
|
||||
p = {
|
||||
"<cmd>BufferLineCyclePrev<CR>",
|
||||
"Previous Buffer"
|
||||
},
|
||||
f = {
|
||||
function() telescope_builtin.current_buffer_fuzzy_find(telescope_themes.get_dropdown()) end,
|
||||
"Find In Buffer"
|
||||
},
|
||||
t = {
|
||||
function() telescope_builtin.treesitter(telescope_themes.get_dropdown()) end,
|
||||
"Find Via Treesitter"
|
||||
},
|
||||
},
|
||||
p = {
|
||||
name = "project",
|
||||
t = {
|
||||
"<cmd>TodoTelescope<CR>",
|
||||
"TODO Comments"
|
||||
},
|
||||
},
|
||||
v = {
|
||||
name = "vcs",
|
||||
s = {
|
||||
function() telescope_builtin.git_status(telescope_themes.get_ivy()) end,
|
||||
"Status"
|
||||
},
|
||||
b = {
|
||||
function() telescope_builtin.git_branches(telescope_themes.get_ivy()) end,
|
||||
"List Branches"
|
||||
},
|
||||
l = {
|
||||
function() require('gitsigns').blame_line() end,
|
||||
"Blame Line"
|
||||
},
|
||||
n = {
|
||||
"<cmd>Neogit<CR>",
|
||||
"Neogit"
|
||||
},
|
||||
c = {
|
||||
"<cmd>Neogit commit<CR>",
|
||||
"Commit"
|
||||
},
|
||||
p = {
|
||||
"<cmd>Neogit pull<CR>",
|
||||
"Pull"
|
||||
},
|
||||
P = {
|
||||
"<cmd>Neogit push<CR>",
|
||||
"Push"
|
||||
},
|
||||
},
|
||||
d = {
|
||||
name = "debug",
|
||||
l = {
|
||||
name = "lsp",
|
||||
i = {
|
||||
"<cmd>LspInfo<CR>",
|
||||
"Info"
|
||||
},
|
||||
n = {
|
||||
"<cmd>NullLsInfo<CR>",
|
||||
"null-ls Info"
|
||||
},
|
||||
r = {
|
||||
"<cmd>LspRestart<CR>",
|
||||
"Restart"
|
||||
}
|
||||
},
|
||||
t = {
|
||||
"<cmd>TSPlaygroundToggle<CR>",
|
||||
"TS Playground"
|
||||
},
|
||||
n = {
|
||||
function() telescope.extensions.notify.notify() end,
|
||||
"Notifications"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- Register which-key mappings
|
||||
wk.register(leader, {prefix = "<leader>", noremap = false, silent = true})
|
||||
|
||||
-- Other mappings
|
||||
vim.keymap.set('n', '<CR>', ':nohlsearch<CR><CR>', {noremap = true, silent = true})
|
||||
vim.keymap.set('i', '<CR>', npairs.autopairs_cr, {noremap = true, expr = true, silent = true})
|
||||
|
||||
vim.keymap.set('n', '<A-Left>', 'b', {noremap = true})
|
||||
vim.keymap.set('n', '<A-Right>', 'w', {noremap = true})
|
||||
vim.keymap.set('n', '<S-Left>', '^', {noremap = true})
|
||||
vim.keymap.set('n', '<S-Right>', '$', {noremap = true})
|
||||
vim.keymap.set('i', '<A-Left>', '<C-o>b', {noremap = true})
|
||||
vim.keymap.set('i', '<A-Right>', '<C-o>w', {noremap = true})
|
||||
vim.keymap.set('i', '<S-Left>', '<C-o>^', {noremap = true})
|
||||
vim.keymap.set('i', '<S-Right>', '<C-o>$', {noremap = true})
|
||||
|
||||
-- vim-yoink
|
||||
vim.keymap.set('n', 'p', '<Plug>(YoinkPaste_p)')
|
||||
vim.keymap.set('n', 'P', '<Plug>(YoinkPaste_P)')
|
||||
vim.keymap.set('x', 'p', '<Plug>(SubversiveSubstitute)')
|
||||
vim.keymap.set('x', 'P', '<Plug>(SubversiveSubstitute)')
|
||||
vim.keymap.set('n', 'gp', '<Plug>(YoinkPaste_gp)')
|
||||
vim.keymap.set('n', 'gP', '<Plug>(YoinkPaste_gP)')
|
||||
vim.keymap.set('n', 'y', '<Plug>(YoinkYankPreserveCursorPosition)')
|
||||
vim.keymap.set('x', 'y', '<Plug>(YoinkYankPreserveCursorPosition)')
|
||||
|
||||
vim.keymap.set('n', '<C-t>', fterm.toggle, {noremap = true, silent = true})
|
||||
vim.keymap.set('t', '<C-t>', '<C-\\><C-n><cmd>lua require("FTerm").toggle()<CR>', {noremap = true, silent = true})
|
||||
end
|
||||
|
||||
function M.lsp_attach(client, bufnr)
|
||||
-- <leader> mappings
|
||||
local leader = {
|
||||
t = {
|
||||
"<cmd>Telescope lsp_document_symbols theme=get_dropdown<CR>",
|
||||
"LSP Document Tags"
|
||||
},
|
||||
l = {
|
||||
name = "lsp",
|
||||
d = {
|
||||
name = "diagnostics",
|
||||
d = {
|
||||
"<cmd>TroubleToggle document_diagnostics<CR>",
|
||||
"Document Diagnostics"
|
||||
},
|
||||
w = {
|
||||
"<cmd>TroubleToggle workspace_diagnostics<CR>",
|
||||
"Workspace Diagnostics"
|
||||
},
|
||||
},
|
||||
c = {
|
||||
name = "code action",
|
||||
a = {
|
||||
"<cmd>Telescope lsp_code_actions theme=get_dropdown<CR>",
|
||||
"Code Action"
|
||||
},
|
||||
},
|
||||
f = {
|
||||
name = "find",
|
||||
r = {
|
||||
"<cmd>TroubleToggle lsp_references<CR>",
|
||||
"References"
|
||||
},
|
||||
d = {
|
||||
"<cmd>TroubleToggle lsp_definitions<CR>",
|
||||
"Definitions"
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Top-level mappings
|
||||
local top = {
|
||||
K = {
|
||||
"<cmd>lua vim.lsp.buf.hover()<CR>",
|
||||
"Show Documentation"
|
||||
},
|
||||
}
|
||||
|
||||
-- Register which-key mappings
|
||||
wk.register(leader, {prefix = "<leader>", noremap = true, silent = true, buffer = bufnr})
|
||||
wk.register(top, {noremap = true, silent = true, buffer = bufnr})
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,73 +0,0 @@
|
|||
-- Lua filetype detection
|
||||
vim.g.did_load_filetypes = 1
|
||||
vim.g.do_filetype_lua = 1
|
||||
|
||||
-- Disable some built-in plugins
|
||||
vim.g.loaded_matchit = 1
|
||||
vim.g.loaded_matchparen = 1
|
||||
vim.g.loaded_gzip = 1
|
||||
vim.g.loaded_rrhelper = 1
|
||||
vim.g.loaded_tarPlugin = 1
|
||||
vim.g.loaded_zipPlugin = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.g.loaded_netrwFileHandlers = 1
|
||||
vim.g.loaded_netrwSettings = 1
|
||||
vim.g.loaded_2html_plugin = 1
|
||||
vim.g.loaded_vimballPlugin = 1
|
||||
vim.g.loaded_getscriptPlugin = 1
|
||||
vim.g.loaded_logipat = 1
|
||||
vim.g.loaded_tutor_mode_plugin = 1
|
||||
|
||||
vim.g.loaded_python_provider = 0
|
||||
vim.g.loaded_python3_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
vim.g.loaded_node_provider = 0
|
||||
vim.g.loaded_perl_provider = 0
|
||||
|
||||
-- Require Plugin Configuration
|
||||
|
||||
-- Keybindings
|
||||
require('nifoc.config.whichkey')
|
||||
require('nifoc.config.yoink')
|
||||
require('nifoc.config.leap')
|
||||
|
||||
-- Syntax
|
||||
require('nifoc.config.treesitter')
|
||||
|
||||
-- Telescope
|
||||
require('nifoc.config.telescope')
|
||||
require('nifoc.config.project')
|
||||
require('nifoc.config.todo_comments')
|
||||
|
||||
-- LSP
|
||||
require('nifoc.config.diagnostic')
|
||||
require('nifoc.config.lsp')
|
||||
require('nifoc.config.null_ls')
|
||||
require('nifoc.config.lsp_trouble')
|
||||
require('nifoc.config.illuminate')
|
||||
|
||||
-- cmp
|
||||
require('nifoc.config.completion')
|
||||
|
||||
-- Pairs
|
||||
require('nifoc.config.autopairs')
|
||||
require('nvim-ts-autotag').setup()
|
||||
require('nifoc.config.matchup')
|
||||
|
||||
-- Comments
|
||||
require('nifoc.config.comments')
|
||||
|
||||
-- Textobjects
|
||||
|
||||
-- UI
|
||||
require('nifoc.config.lualine')
|
||||
require('nifoc.config.bufferline')
|
||||
require('nifoc.config.nvim_tree')
|
||||
require('nifoc.config.indent_line')
|
||||
require('nifoc.config.virt_column')
|
||||
require('nifoc.config.neogit')
|
||||
require('nifoc.config.gitsigns')
|
||||
require('spellsitter').setup()
|
||||
vim.notify = require('notify')
|
||||
require('nifoc.config.visual_eof')
|
||||
require('nifoc.config.fterm')
|
|
@ -1,25 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
local keymap = require('nifoc.keymap')
|
||||
|
||||
function M.maybe_enable_lsp(client, bufnr)
|
||||
if vim.b.nifoc_lsp_enabled == nil then
|
||||
vim.api.nvim_buf_set_var(bufnr, 'nifoc_lsp_enabled', 1)
|
||||
|
||||
keymap.lsp_attach(client, bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
function M.maybe_enable_fixer(client, bufnr)
|
||||
if client.resolved_capabilities.document_formatting and vim.b.nifoc_fixer_enabled == nil then
|
||||
vim.api.nvim_buf_set_var(bufnr, 'nifoc_fixer_enabled', 1)
|
||||
|
||||
local augroup_nifoc_diagnostic = vim.api.nvim_create_augroup("NifocDiagnostic", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", { callback = function()
|
||||
vim.lsp.buf.formatting_sync(nil, 1000)
|
||||
end, group = augroup_nifoc_diagnostic, buffer = bufnr })
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,12 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
function M.maybe_set_relativenumber(value)
|
||||
local toggle_line_style = vim.b.toggle_line_style
|
||||
local do_toggle = toggle_line_style == nil or toggle_line_style == 1
|
||||
|
||||
if do_toggle then
|
||||
vim.opt_local.relativenumber = value
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,112 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
local buffer_not_empty = function()
|
||||
if vim.fn.empty(vim.fn.expand('%:t')) ~= 1 then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local buffer_variable_exists = function(key)
|
||||
return buffer_not_empty() and vim.b[key] ~= nil
|
||||
end
|
||||
|
||||
local buffer_has_lsp = function()
|
||||
return buffer_not_empty() and #vim.lsp.buf_get_clients() > 0
|
||||
end
|
||||
|
||||
function M.line_column()
|
||||
local line = tostring(vim.fn.line('.'))
|
||||
local column = tostring(vim.fn.col('.'))
|
||||
|
||||
return string.format("%3s:%-3s", line, column)
|
||||
end
|
||||
|
||||
function M.current_line_percent()
|
||||
local current_line = vim.fn.line('.')
|
||||
local total_line = vim.fn.line('$')
|
||||
|
||||
if current_line == 1 then
|
||||
return 'Top'
|
||||
elseif current_line == total_line then
|
||||
return 'Bot'
|
||||
end
|
||||
|
||||
return [[%2p%%]]
|
||||
end
|
||||
|
||||
function M.filetype()
|
||||
local f_name = vim.fn.expand('%:t')
|
||||
local f_extension = vim.fn.expand('%:e')
|
||||
local f_type = vim.bo.filetype
|
||||
|
||||
if f_type:len() > 0 then
|
||||
return f_type .. ' ' .. require('nvim-web-devicons').get_icon(f_name, f_extension, {default = true})
|
||||
else
|
||||
return 'no ft'
|
||||
end
|
||||
end
|
||||
|
||||
function M.gitsigns_formatter(status)
|
||||
local added, changed, removed = status.added, status.changed, status.removed
|
||||
local result = {}
|
||||
|
||||
if added ~= nil and added > 0 then
|
||||
table.insert(result, string.format("%%#GitSignsStatuslineAdd# %s", added))
|
||||
end
|
||||
|
||||
if changed ~= nil and changed > 0 then
|
||||
table.insert(result, string.format("%%#GitSignsStatuslineChange# %s", changed))
|
||||
end
|
||||
|
||||
if removed ~= nil and removed > 0 then
|
||||
table.insert(result, string.format("%%#GitSignsStatuslineDelete# %s", removed))
|
||||
end
|
||||
|
||||
return table.concat(result, ' ')
|
||||
end
|
||||
|
||||
function M.current_function()
|
||||
local fn = vim.b.lsp_current_function
|
||||
|
||||
if fn ~= nil and fn:len() > 0 then
|
||||
return ' ' .. fn
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
function M.spell_enabled()
|
||||
if buffer_not_empty() and vim.wo.spell then
|
||||
return 'ﮒ'
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
function M.fixer_enabled()
|
||||
if buffer_variable_exists('nifoc_fixer_enabled') then
|
||||
return ''
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
function M.treesitter_enabled()
|
||||
if buffer_variable_exists('nifoc_treesitter_enabled') then
|
||||
return ''
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
function M.lsp_enabled()
|
||||
if buffer_variable_exists('nifoc_lsp_enabled') then
|
||||
return ''
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,18 +0,0 @@
|
|||
local telescope_themes = require('telescope.themes')
|
||||
|
||||
local M = {}
|
||||
|
||||
M.project_files = function()
|
||||
local git_opts = telescope_themes.get_ivy()
|
||||
local ok = pcall(require'telescope.builtin'.git_files, git_opts)
|
||||
|
||||
if not ok then
|
||||
local find_opts = telescope_themes.get_ivy({
|
||||
find_command = { 'rg', '--files', '--hidden', '-L', '-g', '!.git/*' }
|
||||
})
|
||||
|
||||
require('telescope.builtin').find_files(find_opts)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,121 +0,0 @@
|
|||
-- Preamble
|
||||
vim.cmd('syntax enable')
|
||||
vim.cmd('filetype plugin indent on')
|
||||
vim.opt.compatible = false
|
||||
vim.opt.hidden = true
|
||||
vim.opt.shell = '/bin/sh'
|
||||
|
||||
-- Options
|
||||
vim.opt.encoding = 'utf-8'
|
||||
vim.opt.showmode = false
|
||||
vim.opt.ruler = false
|
||||
vim.opt.ttyfast = true
|
||||
vim.opt.lazyredraw = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = {tab = '»·', trail = '·', nbsp = '·', precedes = '←', extends = '→'}
|
||||
vim.opt.showbreak = '↪ '
|
||||
vim.opt.backspace = {'indent', 'eol', 'start'}
|
||||
vim.opt.showtabline = 2
|
||||
vim.opt.signcolumn = 'yes:1'
|
||||
vim.opt.wildoptions = 'pum'
|
||||
vim.opt.modeline = false
|
||||
vim.opt.startofline = false
|
||||
vim.opt.synmaxcol = 300
|
||||
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.grepprg = 'rg --vimgrep --no-heading'
|
||||
vim.opt.grepformat = '%f:%l:%c:%m,%f:%l:%m'
|
||||
vim.opt.inccommand = 'nosplit'
|
||||
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
||||
|
||||
vim.opt.wrap = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.viewoptions = {'cursor', 'folds', 'slash', 'unix'}
|
||||
|
||||
vim.opt.foldenable = false
|
||||
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
vim.opt.autoread = true
|
||||
|
||||
vim.opt.diffopt = {'filler', 'internal', 'algorithm:histogram', 'indent-heuristic'}
|
||||
|
||||
vim.opt.spelllang = {'en', 'de'}
|
||||
|
||||
-- UI
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.concealcursor = 'nc'
|
||||
|
||||
-- See: https://github.com/antoinemadec/FixCursorHold.nvim
|
||||
vim.opt.updatetime = 750
|
||||
vim.g.cursorhold_updatetime = 100
|
||||
|
||||
vim.opt.shortmess:append('c')
|
||||
vim.opt.shortmess:remove('S')
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.mousemodel = 'popup_setpos'
|
||||
|
||||
-- Plugins
|
||||
require('nifoc.config.themes')
|
||||
require('nifoc.plugins')
|
||||
|
||||
-- Theme
|
||||
vim.opt.background = 'dark'
|
||||
vim.cmd('colorscheme dracula')
|
||||
|
||||
-- Backups
|
||||
vim.opt.backup = false
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = os.getenv('HOME') .. '/.local/share/nvim/undo//'
|
||||
|
||||
-- Clipboard
|
||||
vim.g.clipboard = {
|
||||
name = 'pbcopy',
|
||||
copy = {
|
||||
['+'] = 'pbcopy',
|
||||
['*'] = 'pbcopy',
|
||||
},
|
||||
paste = {
|
||||
['+'] = 'pbpaste',
|
||||
['*'] = 'pbpaste',
|
||||
},
|
||||
cache_enabled = 0,
|
||||
}
|
||||
|
||||
vim.opt.clipboard:prepend('unnamedplus')
|
||||
|
||||
-- Keymap
|
||||
require('nifoc.keymap').setup()
|
||||
|
||||
-- Autocmds
|
||||
local augroup_nifoc_init = vim.api.nvim_create_augroup("NifocInit", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertEnter", { callback = function()
|
||||
require('nifoc.utils.line_style').maybe_set_relativenumber(false)
|
||||
end, group = augroup_nifoc_init })
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", { callback = function()
|
||||
require('nifoc.utils.line_style').maybe_set_relativenumber(true)
|
||||
end, group = augroup_nifoc_init })
|
||||
|
||||
vim.api.nvim_create_autocmd("TermOpen", { callback = function()
|
||||
vim.opt_local.number = false
|
||||
vim.opt_local.relativenumber = false
|
||||
end, group = augroup_nifoc_init })
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = function()
|
||||
vim.highlight.on_yank{higroup="IncSearch", timeout=500}
|
||||
end, group = augroup_nifoc_init })
|
29
config/nvim/nifoc/diagnostic.fnl
Normal file
29
config/nvim/nifoc/diagnostic.fnl
Normal file
|
@ -0,0 +1,29 @@
|
|||
(let [mod {}
|
||||
cmd vim.cmd
|
||||
api vim.api
|
||||
keymap (require :nifoc.keymap)]
|
||||
(fn mod.setup []
|
||||
(vim.diagnostic.config {:underline true
|
||||
:virtual_text {:source false}
|
||||
:signs false
|
||||
:update_in_insert false})
|
||||
(cmd "sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl=")
|
||||
(cmd "sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl=")
|
||||
(cmd "sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl=")
|
||||
(cmd "sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl="))
|
||||
|
||||
(fn mod.maybe-enable-lsp [client bufnr]
|
||||
(when (= vim.b.nifoc_lsp_enabled nil)
|
||||
(api.nvim_buf_set_var bufnr :nifoc_lsp_enabled 1)
|
||||
(keymap.lsp-attach client bufnr)))
|
||||
|
||||
(fn mod.maybe-enable-fixer [client bufnr]
|
||||
(when (and client.resolved_capabilities.document_formatting
|
||||
(= vim.b.nifoc_fixer_enabled nil))
|
||||
(api.nvim_buf_set_var bufnr :nifoc_fixer_enabled 1)
|
||||
(api.nvim_create_autocmd :BufWritePre
|
||||
{:callback #(vim.lsp.buf.formatting_sync nil
|
||||
1000)
|
||||
:buffer bufnr})))
|
||||
|
||||
mod)
|
132
config/nvim/nifoc/keymap.fnl
Normal file
132
config/nvim/nifoc/keymap.fnl
Normal file
|
@ -0,0 +1,132 @@
|
|||
(let [mod {}
|
||||
keymap vim.keymap
|
||||
legendary (require :legendary)
|
||||
telescope (require :telescope)
|
||||
telescope-builtin (require :telescope.builtin)
|
||||
telescope-themes (require :telescope.themes)
|
||||
telescope-nifoc (require :nifoc.telescope)
|
||||
telescope-ivy (telescope-themes.get_ivy)
|
||||
telescope-dropdown (telescope-themes.get_dropdown)
|
||||
npairs (require :nvim-autopairs)
|
||||
gitsigns (require :gitsigns)
|
||||
fterm (require :FTerm)]
|
||||
(fn map-entry [key cmd opts]
|
||||
(vim.tbl_extend :keep {1 key 2 cmd} opts))
|
||||
|
||||
(fn mod.setup []
|
||||
(keymap.set :n :<space> :<nop> {:noremap true})
|
||||
(set vim.g.mapleader " ")
|
||||
(set vim.opt.timeoutlen 500)
|
||||
(legendary.bind_keymaps [(map-entry :<leader>o
|
||||
telescope-nifoc.project-files
|
||||
{:description "Find Files"})
|
||||
(map-entry :<leader>s
|
||||
#(telescope-builtin.live_grep telescope-ivy)
|
||||
{:description "Live Grep"})
|
||||
(map-entry :<leader>fn :<cmd>enew<CR>
|
||||
{:description "New File"})
|
||||
(map-entry :<leader>ut :<cmd>UndotreeToggle<CR>
|
||||
{:description "Toggle Undotree"})
|
||||
;; Buffer
|
||||
(map-entry :<leader>bl
|
||||
#(telescope-builtin.buffers telescope-dropdown)
|
||||
{:description "List Buffers"})
|
||||
(map-entry :<leader>bn
|
||||
:<cmd>BufferLineCycleNext<CR>
|
||||
{:description "Next Buffer"})
|
||||
(map-entry :<leader>bp
|
||||
:<cmd>BufferLineCyclePrev<CR>
|
||||
{:description "Previous Buffer"})
|
||||
(map-entry :<leader>bf
|
||||
#(telescope-builtin.current_buffer_fuzzy_find telescope-dropdown)
|
||||
{:description "Find In Buffer"})
|
||||
(map-entry :<leader>bt
|
||||
#(telescope-builtin.treesitter telescope-dropdown)
|
||||
{:description "Find Via Treesitter"})
|
||||
;; Project
|
||||
(map-entry :<leader>pt :<cmd>TodoTelescope<CR>
|
||||
{:description "TODO Comments"})
|
||||
;; VCS
|
||||
(map-entry :<leader>vs
|
||||
#(telescope-builtin.git_status telescope-ivy)
|
||||
{:description "VCS Status"})
|
||||
(map-entry :<leader>vb
|
||||
#(telescope-builtin.git_branches telescope-dropdown)
|
||||
{:description "List VCS Branches"})
|
||||
(map-entry :<leader>vl gitsigns.blame_line
|
||||
{:description "Blame Line"})
|
||||
(map-entry :<leader>vn :<cmd>Neogit<CR>
|
||||
{:description "Open Neogit"})
|
||||
(map-entry :<leader>vc "<cmd>Neogit commit<CR>"
|
||||
{:description "Neogit Commit"})
|
||||
(map-entry :<leader>vp "<cmd>Neogit pull<CR>"
|
||||
{:description "Neogit Pull"})
|
||||
(map-entry :<leader>vP "<cmd>Neogit push<CR>"
|
||||
{:description "Neogit Push"})
|
||||
;; Debug
|
||||
(map-entry :<leader>dli :<cmd>LspInfo<CR>
|
||||
{:description "LSP Info"})
|
||||
(map-entry :<leader>dln :<cmd>NullLsInfo<CR>
|
||||
{:description "null-ls Info"})
|
||||
(map-entry :<leader>dlr :<cmd>LspRestart<CR>
|
||||
{:description "LSP Restart"})
|
||||
(map-entry :<leader>dt
|
||||
:<cmd>TSPlaygroundToggle<CR>
|
||||
{:description "Toggle Treetsitter Playground"})
|
||||
(map-entry :<leader>dn
|
||||
telescope.extensions.notify.notify
|
||||
{:description "Display Notifications"})])
|
||||
;; Other Mappings
|
||||
(keymap.set :n :<CR> ":nohlsearch<CR><CR>" {:noremap true :silent true})
|
||||
(keymap.set :i :<CR> npairs.autopairs_cr
|
||||
{:noremap true :expr true :silent true})
|
||||
(keymap.set :n :<A-Left> :b {:noremap true})
|
||||
(keymap.set :n :<A-Right> :w {:noremap true})
|
||||
(keymap.set :n :<S-Left> "^" {:noremap true})
|
||||
(keymap.set :n :<S-Right> "$" {:noremap true})
|
||||
(keymap.set :i :<A-Left> :<C-o>b {:noremap true})
|
||||
(keymap.set :i :<A-Right> :<C-o>w {:noremap true})
|
||||
(keymap.set :i :<S-Left> :<C-o>^ {:noremap true})
|
||||
(keymap.set :i :<S-Right> :<C-o>$ {:noremap true})
|
||||
(keymap.set :n :p "<Plug>(YoinkPaste_p)")
|
||||
(keymap.set :n :P "<Plug>(YoinkPaste_P)")
|
||||
(keymap.set :x :p "<Plug>(SubversiveSubstitute)")
|
||||
(keymap.set :x :P "<Plug>(SubversiveSubstitute)")
|
||||
(keymap.set :n :gp "<Plug>(YoinkPaste_gp)")
|
||||
(keymap.set :n :gP "<Plug>(YoinkPaste_gP)")
|
||||
(keymap.set :n :y "<Plug>(YoinkYankPreserveCursorPosition)")
|
||||
(keymap.set :x :y "<Plug>(YoinkYankPreserveCursorPosition)")
|
||||
(keymap.set :n :<C-t> fterm.toggle {:noremap true :silent true})
|
||||
(keymap.set :t :<C-t> "<C-\\><C-n><cmd>lua require(\"FTerm\").toggle()<CR>"
|
||||
{:noremap true :silent true}))
|
||||
|
||||
(fn mod.lsp-attach [client bufnr]
|
||||
(legendary.bind_keymaps [(map-entry :<leader>t
|
||||
#(telescope-builtin.lsp_document_symbols telescope-dropdown)
|
||||
{:description "LSP Document Symbols"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>ldd
|
||||
"<cmd>TroubleToggle document_diagnostics<CR>"
|
||||
{:description "LSP Document Diagnostics"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>ldw
|
||||
"<cmd>TroubleToggle workspace_diagnostics<CR>"
|
||||
{:description "LSP Workspace Diagnostics"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>lca
|
||||
#(telescope-builtin.lsp_code_actions telescope-dropdown)
|
||||
{:description "LSP Code Action"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>lfr
|
||||
"<cmd>TroubleToggle lsp_references<CR>"
|
||||
{:description "Find References"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>lfd
|
||||
"<cmd>TroubleToggle lsp_definitions<CR>"
|
||||
{:description "Find Definitions"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :K vim.lsp.buf.hover
|
||||
{:description "Show Documentation"
|
||||
:opts {:buffer bufnr}})]))
|
||||
|
||||
mod)
|
8
config/nvim/nifoc/line-style.fnl
Normal file
8
config/nvim/nifoc/line-style.fnl
Normal file
|
@ -0,0 +1,8 @@
|
|||
(let [mod {}]
|
||||
(fn mod.maybe-set-relativenumber [value]
|
||||
(let [toggle-style vim.b.toggle_line_style
|
||||
toggle? (or (= toggle-style nil) (= toggle-style 1))]
|
||||
(when toggle?
|
||||
(set vim.opt_local.relativenumber value))))
|
||||
|
||||
mod)
|
60
config/nvim/nifoc/statusline.fnl
Normal file
60
config/nvim/nifoc/statusline.fnl
Normal file
|
@ -0,0 +1,60 @@
|
|||
(let [mod {}
|
||||
web-devicons (require :nvim-web-devicons)]
|
||||
(fn buffer-not-empty? []
|
||||
(not= (vim.fn.empty (vim.fn.expand "%:t")) 1))
|
||||
|
||||
(fn buffer-variable-exists? [key]
|
||||
(and (buffer-not-empty?) (not= (. vim.b key) nil)))
|
||||
|
||||
(fn maybe-insert-git-status [format value result]
|
||||
(when (and (not= value nil) (> value 0))
|
||||
(table.insert result (string.format format value))))
|
||||
|
||||
(fn mod.line-column []
|
||||
(let [line (tostring (vim.fn.line "."))
|
||||
column (tostring (vim.fn.col "."))]
|
||||
(string.format "%3s:%-3s" line column)))
|
||||
|
||||
(fn mod.current-line-percent []
|
||||
(let [current-line (vim.fn.line ".")
|
||||
total-lines (vim.fn.line "$")]
|
||||
(if (= current-line 1) :Top
|
||||
(= current-line total-lines) :Bot
|
||||
"%2p%%")))
|
||||
|
||||
(fn mod.filetype []
|
||||
(let [name (vim.fn.expand "%:t")
|
||||
extension (vim.fn.expand "%:e")
|
||||
ftype vim.bo.filetype]
|
||||
(if (> (ftype:len) 0) (let [icon (web-devicons.get_icon name extension
|
||||
{:default true})]
|
||||
(.. ftype " " icon))
|
||||
"no ft")))
|
||||
|
||||
(fn mod.gitsigns-formatter [status]
|
||||
(let [{: added : changed : removed} status
|
||||
result {}]
|
||||
(maybe-insert-git-status "%%#GitSignsStatuslineAdd# %s" added result)
|
||||
(maybe-insert-git-status "%%#GitSignsStatuslineChange# %s" changed
|
||||
result)
|
||||
(maybe-insert-git-status "%%#GitSignsStatuslineDelete# %s" removed
|
||||
result)
|
||||
(table.concat result " ")))
|
||||
|
||||
(fn mod.current-function []
|
||||
(let [fun vim.b.lsp_current_function]
|
||||
(if (and (not= fun nil) (> (fun:len) 0)) (.. " " fun) "")))
|
||||
|
||||
(fn mod.spell-enabled? []
|
||||
(if (and (buffer-not-empty?) vim.wo.spell) "ﮒ" ""))
|
||||
|
||||
(fn mod.fixer-enabled? []
|
||||
(if (buffer-variable-exists? :nifoc_fixer_enabled) "" ""))
|
||||
|
||||
(fn mod.treesitter-enabled? []
|
||||
(if (buffer-variable-exists? :nifoc_treesitter_enabled) "" ""))
|
||||
|
||||
(fn mod.lsp-enabled? []
|
||||
(if (buffer-variable-exists? :nifoc_lsp_enabled) "" ""))
|
||||
|
||||
mod)
|
16
config/nvim/nifoc/telescope.fnl
Normal file
16
config/nvim/nifoc/telescope.fnl
Normal file
|
@ -0,0 +1,16 @@
|
|||
(let [mod {}
|
||||
builtin (require :telescope.builtin)
|
||||
themes (require :telescope.themes)]
|
||||
(fn mod.project-files []
|
||||
(let [git-opts (themes.get_ivy)
|
||||
find-opts (themes.get_ivy {:find_command [:rg
|
||||
:--files
|
||||
:--hidden
|
||||
:-L
|
||||
:-g
|
||||
:!.git/*]})
|
||||
ok? (pcall builtin.git_files git-opts)]
|
||||
(when (not ok?)
|
||||
(builtin.find_files find-opts))))
|
||||
|
||||
mod)
|
5
config/nvim/plugins/autopairs.fnl
Normal file
5
config/nvim/plugins/autopairs.fnl
Normal file
|
@ -0,0 +1,5 @@
|
|||
(let [npairs (require :nvim-autopairs)]
|
||||
(npairs.setup {:check_ts true
|
||||
:ts_config {:javascript [:string :template_string]
|
||||
:elixir [:string]
|
||||
:lua [:string :source]}}))
|
10
config/nvim/plugins/bufferline.fnl
Normal file
10
config/nvim/plugins/bufferline.fnl
Normal file
|
@ -0,0 +1,10 @@
|
|||
(let [bufferline (require :bufferline)]
|
||||
(bufferline.setup {:options {:show_close_icon false
|
||||
:diagnostics :nvim_lsp
|
||||
:diagnostics_indicator (lambda [count
|
||||
?level
|
||||
?diagnostics-dict
|
||||
context]
|
||||
(if (context.buffer:current)
|
||||
""
|
||||
(.. " (" count ")")))}}))
|
63
config/nvim/plugins/cmp.fnl
Normal file
63
config/nvim/plugins/cmp.fnl
Normal file
|
@ -0,0 +1,63 @@
|
|||
(let [cmp (require :cmp)
|
||||
luasnip (require :luasnip)
|
||||
lspkind (require :lspkind)
|
||||
npairs (require :nvim-autopairs.completion.cmp)]
|
||||
(fn has-words-before? []
|
||||
(let [(line col) (-> 0 (vim.api.nvim_win_get_cursor) (unpack))]
|
||||
(if (not= col 0)
|
||||
(let [line-content (vim.api.nvim_buf_get_lines 0 (- line 1) line true)
|
||||
cursor-content (: (. line-content 1) :sub col col)]
|
||||
(= (cursor-content:match "%s") nil))
|
||||
false)))
|
||||
|
||||
(fn map-tab [fallback]
|
||||
(if (cmp.visible) (cmp.select_next_item)
|
||||
(luasnip.expand_or_jumpable) (luasnip.expand_or_jump)
|
||||
(has-words-before?) (cmp.complete)
|
||||
(fallback)))
|
||||
|
||||
(fn map-stab [fallback]
|
||||
(if (cmp.visible) (cmp.select_prev_item)
|
||||
(luasnip.jumpable -1) (luasnip.jump -1)
|
||||
(fallback)))
|
||||
|
||||
(cmp.setup {:sources (cmp.config.sources [{:name :nvim_lsp}
|
||||
{:name :luasnip}
|
||||
{:name :nvim_lua}]
|
||||
[{:name :treesitter}
|
||||
{:name :buffer}
|
||||
{:name :path}])
|
||||
:mapping {:<C-e> (cmp.mapping {:i (cmp.mapping.abort)
|
||||
:c (cmp.mapping.close)})
|
||||
:<Tab> (cmp.mapping {:c #(if (cmp.visible)
|
||||
(cmp.select_next_item {:behavior cmp.SelectBehavior.Insert})
|
||||
(cmp.complete))
|
||||
:i map-tab
|
||||
:s map-tab})
|
||||
:<S-Tab> (cmp.mapping {:c #(if (cmp.visible)
|
||||
(cmp.select_prev_item {:behavior cmp.SelectBehavior.Insert})
|
||||
(cmp.complete))
|
||||
:i map-stab
|
||||
:s map-stab})
|
||||
:<C-Space> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert
|
||||
:select true})
|
||||
:<CR> (cmp.mapping.confirm {:select true})}
|
||||
:completion {:keyword_length 2
|
||||
:completeopt "menu,menuone,noinsert"}
|
||||
:documentation {:border ["╭"
|
||||
"─"
|
||||
"╮"
|
||||
"│"
|
||||
"╯"
|
||||
"─"
|
||||
"╰"
|
||||
"│"]}
|
||||
:snippet {:expand #(luasnip.lsp_expand $1.body)}
|
||||
:formatting {:format (lspkind.cmp_format)}})
|
||||
(cmp.setup.cmdline "/"
|
||||
{:sources (cmp.config.sources [{:name :nvim_lsp_document_symbol}]
|
||||
[{:name :buffer}])})
|
||||
(cmp.setup.cmdline ":"
|
||||
{:sources (cmp.config.sources [{:name :path}]
|
||||
[{:name :cmdline}])})
|
||||
(cmp.event:on :confirm_done (npairs.on_confirm_done {:map_char {:tex ""}})))
|
2
config/nvim/plugins/comment.fnl
Normal file
2
config/nvim/plugins/comment.fnl
Normal file
|
@ -0,0 +1,2 @@
|
|||
(let [cmt (require :Comment)]
|
||||
(cmt.setup {:padding true}))
|
3
config/nvim/plugins/fterm.fnl
Normal file
3
config/nvim/plugins/fterm.fnl
Normal file
|
@ -0,0 +1,3 @@
|
|||
(let [fterm (require :FTerm)]
|
||||
(fterm.setup {:cmd :fish
|
||||
:border ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]}))
|
26
config/nvim/plugins/gitsigns.fnl
Normal file
26
config/nvim/plugins/gitsigns.fnl
Normal file
|
@ -0,0 +1,26 @@
|
|||
(let [gitsigns (require :gitsigns)
|
||||
ns (require :nifoc.statusline)]
|
||||
(gitsigns.setup {:signs {:add {:hl :GitSignsAdd
|
||||
:text "│"
|
||||
:numhl :GitSignsAddNr
|
||||
:linehl :GitSignsAddLn}
|
||||
:change {:hl :GitSignsChange
|
||||
:text "│"
|
||||
:numhl :GitSignsChangeNr
|
||||
:linehl :GitSignsChangeLn}
|
||||
:delete {:hl :GitSignsDelete
|
||||
:text "_"
|
||||
:numhl :GitSignsDeleteNr
|
||||
:linehl :GitSignsDeleteLn}
|
||||
:topdelete {:hl :GitSignsDelete
|
||||
:text "‾"
|
||||
:numhl :GitSignsDeleteNr
|
||||
:linehl :GitSignsDeleteLn}
|
||||
:changedelete {:hl :GitSignsChange
|
||||
:text "~"
|
||||
:numhl :GitSignsChangeNr
|
||||
:linehl :GitSignsChangeLn}}
|
||||
:numhl false
|
||||
:linehl false
|
||||
:status_formatter ns.gitsigns-formatter
|
||||
:diff_opts {:internal true}}))
|
2
config/nvim/plugins/illuminate.fnl
Normal file
2
config/nvim/plugins/illuminate.fnl
Normal file
|
@ -0,0 +1,2 @@
|
|||
(let [g vim.g]
|
||||
(set g.Illuminate_ftblacklist [:netrw]))
|
11
config/nvim/plugins/indent_line.fnl
Normal file
11
config/nvim/plugins/indent_line.fnl
Normal file
|
@ -0,0 +1,11 @@
|
|||
(let [indent (require :indent_blankline)]
|
||||
(indent.setup {:char "¦"
|
||||
:show_first_indent_level false
|
||||
:use_treesitter true
|
||||
:show_current_context true
|
||||
:context_patterns [:class
|
||||
:function
|
||||
:method
|
||||
:do_block
|
||||
:stab_clause]
|
||||
:buftype_exclude [:help :nofile :terminal]}))
|
71
config/nvim/plugins/lsp.fnl
Normal file
71
config/nvim/plugins/lsp.fnl
Normal file
|
@ -0,0 +1,71 @@
|
|||
(let [lsp (require :lspconfig)
|
||||
lsp-status (require :lsp-status)
|
||||
illuminate (require :illuminate)
|
||||
virtual-types (require :virtualtypes)
|
||||
cmp (require :cmp_nvim_lsp)
|
||||
diagnostic (require :nifoc.diagnostic)]
|
||||
(fn custom-attach [client bufnr]
|
||||
(when client.resolved_capabilities.document_symbol
|
||||
(lsp_status.on_attach client bufnr))
|
||||
(when client.resolved_capabilities.document_highlight
|
||||
(illuminate.on_attach client bufnr))
|
||||
(when client.resolved_capabilities.code_lens
|
||||
(virtual-types.on_attach client bufnr))
|
||||
(diagnostic.maybe-enable-lsp client bufnr)
|
||||
(diagnostic.maybe-enable-fixer client bufnr))
|
||||
|
||||
(fn custom-attach-no-format [client bufnr]
|
||||
(set client.resolved_capabilities.document_formatting false)
|
||||
(custom-attach client bufnr))
|
||||
|
||||
;; Setup
|
||||
(lsp-status.config {:current_function true
|
||||
:show_filename false
|
||||
:diagnostics false})
|
||||
(lsp-status.register_progress)
|
||||
;; Servers
|
||||
(let [default-capabilities (vim.lsp.protocol.make_client_capabilities)
|
||||
capabilities (vim.tbl_extend :keep
|
||||
(cmp.update_capabilities default-capabilities)
|
||||
lsp-status.capabilities)
|
||||
flags {:allow_incremental_sync true :debounce_text_changes 700}
|
||||
default-config {:on_attach custom-attach : capabilities : flags}
|
||||
default-servers [:bashls
|
||||
:cssls
|
||||
:dockerls
|
||||
:erlangls
|
||||
:eslint
|
||||
:html
|
||||
:rnix
|
||||
:sqls
|
||||
:taplo
|
||||
:yamlls]]
|
||||
;; Default
|
||||
(each [_ name (pairs default-servers)]
|
||||
((. lsp name :setup) default-config))
|
||||
;; Custom
|
||||
(lsp.elixirls.setup (->> {:cmd [:elixir-ls]}
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(lsp.tsserver.setup (->> {:cmd [:typescript-language-server
|
||||
:--stdio
|
||||
:--tsserver-path
|
||||
:tsserver]
|
||||
:on_attach custom-attach-no-format}
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(lsp.jsonls.setup (->> {:cmd [:vscode-json-language-server :--stdio]}
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(lsp.solargraph.setup (->> {:settings {:solargraph {:diagnostics true}}}
|
||||
(vim.tbl_extend :force default-config)))
|
||||
(lsp.sumneko_lua.setup (->> {:cmd [:lua-language-server]
|
||||
:root_dir (or (lsp.util.root_pattern :init.vim
|
||||
:init.lua
|
||||
:.git)
|
||||
(vim.loop.os_homedir))
|
||||
:settings {:Lua {:runtime {:version :LuaJIT
|
||||
:path (vim.split package.path
|
||||
";")}
|
||||
:diagnostics {:globals [:vim]}
|
||||
:workspace {:library {(vim.fn.expand "\$VIMRUNTIME/lua") true
|
||||
(vim.fn.expand "\$VIMRUNTIME/lua/vim/lsp") true}}
|
||||
:telemetry {:enable false}}}}
|
||||
(vim.tbl_extend :force default-config)))))
|
25
config/nvim/plugins/lualine.fnl
Normal file
25
config/nvim/plugins/lualine.fnl
Normal file
|
@ -0,0 +1,25 @@
|
|||
(let [lualine (require :lualine)
|
||||
ns (require :nifoc.statusline)]
|
||||
(lualine.setup {:options {:globalstatus true
|
||||
:theme :dracula-nvim
|
||||
:section_separators ""
|
||||
:component_separators "|"
|
||||
:icons_enabled true}
|
||||
:sections {; Left
|
||||
:lualine_a [:mode]
|
||||
:lualine_b ["b:gitsigns_status"
|
||||
[:diagnostics
|
||||
{:sources [:nvim_diagnostic]
|
||||
:symbols {:error " "
|
||||
:warn " "
|
||||
:info " "
|
||||
:hint " "}}]]
|
||||
:lualine_c [ns.current-function]
|
||||
; Right
|
||||
:lualine_x [:filetype
|
||||
ns.lsp-enabled?
|
||||
ns.treesitter-enabled?
|
||||
ns.fixer-enabled?
|
||||
ns.spell-enabled?]
|
||||
:lualine_y [ns.current-line-percent]
|
||||
:lualine_z [ns.line-column]}}))
|
3
config/nvim/plugins/matchup.fnl
Normal file
3
config/nvim/plugins/matchup.fnl
Normal file
|
@ -0,0 +1,3 @@
|
|||
(let [g vim.g]
|
||||
(set g.matchup_matchparen_deferred true)
|
||||
(set g.matchup_matchparen_offscreen {:method :popup}))
|
5
config/nvim/plugins/neogit.fnl
Normal file
5
config/nvim/plugins/neogit.fnl
Normal file
|
@ -0,0 +1,5 @@
|
|||
(let [neogit (require :neogit)]
|
||||
(neogit.setup {:signs {; [ CLOSED, OPENED ]
|
||||
:section ["" ""]
|
||||
:item ["" ""]
|
||||
:hunk ["" ""]}}))
|
22
config/nvim/plugins/null-ls.fnl
Normal file
22
config/nvim/plugins/null-ls.fnl
Normal file
|
@ -0,0 +1,22 @@
|
|||
(let [null-ls (require :null-ls)
|
||||
builtins null-ls.builtins
|
||||
diagnostic (require :nifoc.diagnostic)]
|
||||
(null-ls.setup {:debounce 700
|
||||
:sources [; Formatting
|
||||
builtins.formatting.fish_indent
|
||||
builtins.formatting.fnlfmt
|
||||
(builtins.formatting.shfmt.with {:extra_args [:-i
|
||||
:2]})
|
||||
; Diagnostics
|
||||
builtins.diagnostics.credo
|
||||
builtins.diagnostics.hadolint
|
||||
(builtins.diagnostics.shellcheck.with {:extra_args [:-f
|
||||
:gcc
|
||||
:-x]})
|
||||
builtins.diagnostics.statix
|
||||
; Code Actions
|
||||
builtins.code_actions.shellcheck
|
||||
builtins.code_actions.statix]
|
||||
:on_attach (lambda [client bufnr]
|
||||
(diagnostic.maybe-enable-lsp client bufnr)
|
||||
(diagnostic.maybe-enable-fixer client bufnr))}))
|
13
config/nvim/plugins/project.fnl
Normal file
13
config/nvim/plugins/project.fnl
Normal file
|
@ -0,0 +1,13 @@
|
|||
(let [project (require :project_nvim)]
|
||||
(project.setup {:detection_methods [:pattern :lsp]
|
||||
:patterns [:.git
|
||||
:_darcs
|
||||
:.hg
|
||||
:.bzr
|
||||
:.svn
|
||||
:.gitlab-ci.yml
|
||||
:flake.nix
|
||||
:init.lua
|
||||
:Makefile
|
||||
:mix.exs
|
||||
:package.json]}))
|
27
config/nvim/plugins/telescope.fnl
Normal file
27
config/nvim/plugins/telescope.fnl
Normal file
|
@ -0,0 +1,27 @@
|
|||
(let [telescope (require :telescope)
|
||||
actions (require :telescope.actions)
|
||||
themes (require :telescope.themes)]
|
||||
(telescope.setup {:defaults {; Display
|
||||
:prompt_prefix " "
|
||||
:selection_caret " "
|
||||
:set_env {:COLORTERM :truecolor}
|
||||
:path_display [:smart :absolute]
|
||||
; Layout
|
||||
:layout_strategy :horizontal
|
||||
:layout_config {:horizontal {:preview_width 0.5}}
|
||||
; Mappings
|
||||
:mappings {:i {:<esc> actions.close}}}
|
||||
:extensions {:ui-select [(themes.get_dropdown {})]}})
|
||||
(let [augroup (vim.api.nvim_create_augroup :NifocTelescope {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd]
|
||||
(aucmd :FileType {:pattern :TelescopePrompt
|
||||
:callback #(set vim.opt_local.cursorline false)
|
||||
:group augroup})
|
||||
(aucmd :User {:pattern :TelescopePreviewerLoaded
|
||||
:command "let w:is_telescope=v:true"
|
||||
:group augroup})
|
||||
(aucmd :BufWinEnter {:callback #(when vim.w.is_telescope
|
||||
(set vim.opt_local.number true)
|
||||
(set vim.opt_local.relativenumber false)
|
||||
(set vim.opt_local.wrap true))
|
||||
:group augroup})))
|
2
config/nvim/plugins/todo-comments.fnl
Normal file
2
config/nvim/plugins/todo-comments.fnl
Normal file
|
@ -0,0 +1,2 @@
|
|||
(let [todo-comments (require :todo-comments)]
|
||||
(todo-comments.setup {:signs false}))
|
33
config/nvim/plugins/treesitter.fnl
Normal file
33
config/nvim/plugins/treesitter.fnl
Normal file
|
@ -0,0 +1,33 @@
|
|||
(let [treesitter (require :nvim-treesitter)
|
||||
treesitter-config (require :nvim-treesitter.configs)
|
||||
treesitter-parsers (require :nvim-treesitter.parsers)
|
||||
set-bufvar vim.api.nvim_buf_set_var
|
||||
rainbow-parsers [:fennel]]
|
||||
(treesitter.define_modules {:nifoc_hooks {:enable false
|
||||
:attach (lambda [bufnr]
|
||||
(set-bufvar bufnr
|
||||
:nifoc_treesitter_enabled
|
||||
1))
|
||||
:detach (lambda [bufnr]
|
||||
(set-bufvar bufnr
|
||||
:nifoc_treesitter_enabled
|
||||
0))
|
||||
:is_supported #true}})
|
||||
(treesitter-config.setup {:ensure_installed :maintained
|
||||
:highlight {:enable true}
|
||||
:indent {:enable true}
|
||||
:textobjects {:select {:enable true
|
||||
:keymaps {:af "@function.outer"
|
||||
:if "@function.inner"
|
||||
:ac "@conditional.outer"
|
||||
:ic "@conditional.inner"}}}
|
||||
:rainbow {:enable true
|
||||
:disable (vim.tbl_filter (fn [parser]
|
||||
(not (vim.tbl_contains rainbow-parsers
|
||||
parser)))
|
||||
(treesitter-parsers.available_parsers))}
|
||||
:matchup {:enable true}
|
||||
:autopairs {:enable true}
|
||||
:autotag {:enable true}
|
||||
:playground {:enable true}
|
||||
:nifoc_hooks {:enable true}}))
|
3
config/nvim/plugins/trouble.fnl
Normal file
3
config/nvim/plugins/trouble.fnl
Normal file
|
@ -0,0 +1,3 @@
|
|||
(let [trouble (require :trouble)]
|
||||
(trouble.setup {:action_keys {:previous :<Up> :next :<Down>}
|
||||
:use_diagnostic_signs true}))
|
10
config/nvim/plugins/visual-eof.fnl
Normal file
10
config/nvim/plugins/visual-eof.fnl
Normal file
|
@ -0,0 +1,10 @@
|
|||
(let [visual-eof (require :visual-eof)]
|
||||
(visual-eof.setup {:text_EOL "↵"
|
||||
:text_NOEOL "✗↵"
|
||||
:ft_ng [:git.* :LspTrouble :netrw :TelescopePrompt]
|
||||
:buf_filter (lambda [bufnr]
|
||||
(let [disable_buftypes [:terminal :nofile]
|
||||
buftype (vim.api.nvim_buf_get_option bufnr
|
||||
:buftype)]
|
||||
(not (vim.tbl_contains disable_buftypes
|
||||
buftype))))}))
|
6
config/nvim/plugins/yoink.fnl
Normal file
6
config/nvim/plugins/yoink.fnl
Normal file
|
@ -0,0 +1,6 @@
|
|||
(let [g vim.g
|
||||
cmd vim.cmd]
|
||||
(set g.yoinkIncludeDeleteOperations 1)
|
||||
(cmd "packadd! vim-cutlass")
|
||||
(cmd "packadd! vim-yoink")
|
||||
(cmd "packadd! vim-subversive"))
|
24
flake.lock
24
flake.lock
|
@ -73,11 +73,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1648847985,
|
||||
"narHash": "sha256-Uj4y08YLm1eogzEZAtyzdgbAPilPCxmNwgWm4XP2Nno=",
|
||||
"lastModified": 1649130493,
|
||||
"narHash": "sha256-tp2UxeS1A5ESb+I/rh4GoD0DH7edOGdc2fsP6D8o27Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "38156bd4ede9b5b92a7313033e000c1cad767553",
|
||||
"rev": "07b941f0c45ac4af6732d96f4cb6142824eee3df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -96,11 +96,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1648784445,
|
||||
"narHash": "sha256-8H68++NZ2mUB1/DHrHsfUoT5vSRsLADCW6xS4a45+CE=",
|
||||
"lastModified": 1649120448,
|
||||
"narHash": "sha256-x9WDekkKfkclTlm1fHtc4x3RODJ/BK9tPhi/RwnATlU=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "973e91007ce3f343f7aeed8d30d70a8616ab6bb5",
|
||||
"rev": "e135adcb8c4f32332ba87ea6681f41330b909e1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -119,11 +119,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1648801045,
|
||||
"narHash": "sha256-F7HYMmowe7G4TS1zoT138ni0O3sPnbK6oPXMlXM22+U=",
|
||||
"lastModified": 1649146867,
|
||||
"narHash": "sha256-S5SLLg5u0MTeogTmnB0QcXu10lkkl/erZ9oFGQwLFq8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "a720dae02765dd611f974ec95a83f353cb334a99",
|
||||
"rev": "36e2791d468498789529c5bbd3d74948ed82f5c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -186,11 +186,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1648773669,
|
||||
"narHash": "sha256-apwKGQ5AqJ6qIX2Qf73evyMWGEiqQvaD2qw42YKg2EY=",
|
||||
"lastModified": 1649118972,
|
||||
"narHash": "sha256-VCtGkNvjYd5uwy/tTprZGHSzWo8ZA9UcxHl28ImM2tM=",
|
||||
"owner": "arqv",
|
||||
"repo": "zig-overlay",
|
||||
"rev": "75d588726a75c4b98b82c86e51fb7a70a6d3bef8",
|
||||
"rev": "a7281505148bd2879e69f319145601c70dadc546",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
4
home.nix
4
home.nix
|
@ -64,7 +64,7 @@
|
|||
updateAppCaches = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
# neovim
|
||||
echo -n '[nvim] Removing luacache file: '
|
||||
rm -f $HOME/.cache/nvim/luacache*
|
||||
$DRY_RUN_CMD rm -f $HOME/.cache/nvim/luacache*
|
||||
echo 'Done'
|
||||
'';
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
nvim_bin="$newGenPath/home-path/bin/nvim"
|
||||
if [ -e "$nvim_bin" ]; then
|
||||
echo -n '[nvim] Running TSUpdateSync ... '
|
||||
$nvim_bin -c 'try | execute "TSUpdateSync" | echo "Done" | catch /.*/ | echo "Command not found" | endtry | q' --headless
|
||||
$DRY_RUN_CMD $nvim_bin -c 'try | execute "TSUpdateSync" | echo "Done" | catch /.*/ | echo "Command not found" | endtry | q' --headless
|
||||
printf '\n'
|
||||
fi
|
||||
'';
|
||||
|
|
|
@ -23,7 +23,7 @@ in
|
|||
|
||||
lua << EOF
|
||||
require('impatient')
|
||||
require('nix_init')
|
||||
require('configuration.init')
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -48,6 +48,7 @@ in
|
|||
|
||||
# LSP Tools
|
||||
hadolint
|
||||
fnlfmt
|
||||
shellcheck
|
||||
shfmt
|
||||
statix
|
||||
|
@ -60,40 +61,88 @@ in
|
|||
# Utils
|
||||
popup-nvim
|
||||
plenary-nvim
|
||||
nvim-web-devicons
|
||||
|
||||
# Keybindings
|
||||
which-key-nvim
|
||||
{ plugin = vim-yoink; optional = true; }
|
||||
{
|
||||
plugin = legendary-nvim;
|
||||
config = ''
|
||||
(let [legendary (require :legendary)]
|
||||
(legendary.setup))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vim-yoink;
|
||||
optional = true;
|
||||
config = builtins.readFile ../../config/nvim/plugins/yoink.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{ plugin = vim-cutlass; optional = true; }
|
||||
{ plugin = vim-subversive; optional = true; }
|
||||
leap-nvim
|
||||
|
||||
{
|
||||
plugin = leap-nvim;
|
||||
config = ''
|
||||
(let [leap (require :leap)]
|
||||
(leap.set_default_keymaps))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Themes
|
||||
dracula-nvim
|
||||
{
|
||||
plugin = dracula-nvim;
|
||||
config = ''
|
||||
(let [g vim.g]
|
||||
(set g.dracula_show_end_of_buffer false))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Syntax
|
||||
nvim-treesitter
|
||||
{
|
||||
plugin = nvim-treesitter;
|
||||
config = builtins.readFile ../../config/nvim/plugins/treesitter.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
nvim-ts-rainbow
|
||||
playground
|
||||
|
||||
# Telescope
|
||||
telescope-nvim
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/telescope.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
telescope-zf-native-nvim
|
||||
telescope-ui-select-nvim
|
||||
project-nvim
|
||||
todo-comments-nvim
|
||||
|
||||
# LSP
|
||||
nvim-lspconfig
|
||||
null-ls-nvim
|
||||
trouble-nvim
|
||||
lspkind-nvim
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
config = builtins.readFile ../../config/nvim/plugins/lsp.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = null-ls-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/null-ls.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
virtual-types-nvim
|
||||
lsp-status-nvim
|
||||
vim-illuminate
|
||||
|
||||
# cmp
|
||||
nvim-cmp
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
config = builtins.readFile ../../config/nvim/plugins/cmp.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
cmp-nvim-lsp
|
||||
cmp-nvim-lsp-signature-help
|
||||
LuaSnip
|
||||
|
@ -106,42 +155,189 @@ in
|
|||
cmp-nvim-lsp-document-symbol
|
||||
|
||||
# Pairs
|
||||
nvim-autopairs
|
||||
nvim-ts-autotag
|
||||
vim-matchup
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
config = builtins.readFile ../../config/nvim/plugins/autopairs.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Comments
|
||||
Comment-nvim
|
||||
{
|
||||
plugin = nvim-ts-autotag;
|
||||
config = ''
|
||||
(let [ts-autotag (require :nvim-ts-autotag)]
|
||||
(ts-autotag.setup))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vim-matchup;
|
||||
config = builtins.readFile ../../config/nvim/plugins/matchup.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Textobjects
|
||||
nvim-treesitter-textobjects
|
||||
|
||||
# UI
|
||||
lualine-nvim
|
||||
bufferline-nvim
|
||||
nvim-tree-lua
|
||||
indent-blankline-nvim
|
||||
virt-column-nvim
|
||||
neogit
|
||||
gitsigns-nvim
|
||||
spellsitter-nvim
|
||||
nvim-notify
|
||||
nvim-visual-eof-lua
|
||||
FTerm-nvim
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/lualine.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = bufferline-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/bufferline.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = indent-blankline-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/indent_line.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = virt-column-nvim;
|
||||
config = ''
|
||||
(let [virt-column (require :virt-column)]
|
||||
(virt-column.setup))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = neogit;
|
||||
config = builtins.readFile ../../config/nvim/plugins/neogit.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/gitsigns.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = spellsitter-nvim;
|
||||
config = ''
|
||||
(let [spellsitter (require :spellsitter)]
|
||||
(spellsitter.setup))
|
||||
'';
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-notify;
|
||||
config = "(set vim.notify (require :notify))";
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-visual-eof-lua;
|
||||
config = builtins.readFile ../../config/nvim/plugins/visual-eof.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
]) ++ (with pkgs.vimPlugins; [
|
||||
# Fixes
|
||||
FixCursorHold-nvim
|
||||
|
||||
# Utils
|
||||
nvim-web-devicons
|
||||
|
||||
# Telescope
|
||||
{
|
||||
plugin = project-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/project.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = todo-comments-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/todo-comments.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# LSP
|
||||
{
|
||||
plugin = trouble-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/trouble.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
lspkind-nvim
|
||||
lsp-status-nvim
|
||||
|
||||
{
|
||||
plugin = vim-illuminate;
|
||||
config = builtins.readFile ../../config/nvim/plugins/illuminate.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Comments
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/comment.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
# Textobjects
|
||||
vim-surround
|
||||
|
||||
# UI
|
||||
undotree
|
||||
|
||||
{
|
||||
plugin = FTerm-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/fterm.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
]);
|
||||
};
|
||||
|
||||
xdg.configFile.nvim = {
|
||||
source = ../../config/nvim;
|
||||
xdg.configFile."nvim/lua" = {
|
||||
source = pkgs.runCommandLocal "nvim-fennel-files"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.fennel pkgs.stylua ];
|
||||
} ''
|
||||
mkdir -p $out/configuration
|
||||
mkdir -p $out/nifoc/utils
|
||||
|
||||
fennel --use-bit-lib --compile "${../../config/nvim/init.fnl}" > "$out/configuration/init.lua"
|
||||
|
||||
cat <<EOF >>plugins.fnl
|
||||
${config.programs.neovim.generatedConfigs.fennel}
|
||||
nil
|
||||
EOF
|
||||
|
||||
fennel --use-bit-lib --compile "./plugins.fnl" > "$out/configuration/plugins.lua"
|
||||
|
||||
nifoc_store_path="${../../config/nvim/nifoc}"
|
||||
nifoc_store_lua="$(find "$nifoc_store_path" -type f -name '*.lua')"
|
||||
nifoc_store_fnl="$(find "$nifoc_store_path" -type f -name '*.fnl')"
|
||||
|
||||
for luafile in $nifoc_store_lua; do
|
||||
file_out_path="$(echo "$luafile" | sed "s|$nifoc_store_path/||")"
|
||||
|
||||
echo "Copying $luafile ..."
|
||||
cat "$luafile" > "$out/nifoc/$file_out_path"
|
||||
done
|
||||
|
||||
for fnlfile in $nifoc_store_fnl; do
|
||||
file_out_path="$(echo "$fnlfile" | sed "s|$nifoc_store_path/||" | sed "s/.fnl$/.lua/")"
|
||||
|
||||
echo "Compiling $fnlfile ..."
|
||||
fennel --use-bit-lib --compile "$fnlfile" > "$out/nifoc/$file_out_path"
|
||||
done
|
||||
|
||||
stylua $out/
|
||||
'';
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/after" = {
|
||||
source = ../../config/nvim/after;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,39 +27,27 @@
|
|||
};
|
||||
plenary-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "plenary.nvim";
|
||||
version = "1648623396";
|
||||
version = "1648990022";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-lua";
|
||||
repo = "plenary.nvim";
|
||||
rev = "cbaeb9fffc14e7e5687715987a94b4f410084560";
|
||||
sha256 = "DkIyoh4sM3IrtyVuHUMKPetOS75z8Z38ebUBg0laHvU=";
|
||||
rev = "f9c65cd76ffa76a0818923c6bce5771687dfe64c";
|
||||
sha256 = "Et8nlHtHhBBnvogSzH7FZFhUYUd6CWSh2RBUZA8m8c0=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/nvim-lua/plenary.nvim";
|
||||
};
|
||||
nvim-web-devicons = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-web-devicons";
|
||||
version = "1647975972";
|
||||
legendary-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "legendary.nvim";
|
||||
version = "1649095494";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kyazdani42";
|
||||
repo = "nvim-web-devicons";
|
||||
rev = "09e62319974d7d7ec7e53b974724f7942470ef78";
|
||||
sha256 = "mOvTXbJ2uQseNuQfdTrUuFHWRg2ia9yXld+4WiBVxDg=";
|
||||
owner = "mrjones2014";
|
||||
repo = "legendary.nvim";
|
||||
rev = "c70d8cd627c26f169c839e4b089c0b4dc53fbe13";
|
||||
sha256 = "R+KRaflot80sRG8glKDWQ/clLvkXeKpt1NnF5Qvca6g=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/kyazdani42/nvim-web-devicons";
|
||||
};
|
||||
which-key-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "which-key.nvim";
|
||||
version = "1647590687";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "folke";
|
||||
repo = "which-key.nvim";
|
||||
rev = "a3c19ec5754debb7bf38a8404e36a9287b282430";
|
||||
sha256 = "KvzS9Lzkw09s0TRmHLN/CLjXvietGJzI06W7WNChcwI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/folke/which-key.nvim";
|
||||
meta.homepage = "https://github.com/mrjones2014/legendary.nvim";
|
||||
};
|
||||
vim-yoink = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "vim-yoink";
|
||||
|
@ -99,12 +87,12 @@
|
|||
};
|
||||
leap-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "leap.nvim";
|
||||
version = "1648801356";
|
||||
version = "1648991969";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ggandor";
|
||||
repo = "leap.nvim";
|
||||
rev = "df770841885f22d4cc7265fa74290c5afe371591";
|
||||
sha256 = "6cKVGt8Z9d6IuPVRaGwSwp3hoWVDilAIketNDi8767w=";
|
||||
rev = "e14aff7302fc825732a8a56c5299c356ff3a39cc";
|
||||
sha256 = "hAZJ+9I+f622VFYC4ntuk1SssUK2Kr7/9OZVcrzM6eA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/ggandor/leap.nvim";
|
||||
|
@ -123,16 +111,28 @@
|
|||
};
|
||||
nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-treesitter";
|
||||
version = "1648825746";
|
||||
version = "1649143663";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-treesitter";
|
||||
repo = "nvim-treesitter";
|
||||
rev = "aadad4738e8453b3b0928ba0aa8f49b6878abace";
|
||||
sha256 = "DGNsmVYdGf9yvyYZgwpjSxxLnvVrEDMdF6uBz0I8HwM=";
|
||||
rev = "f083b7bbfe9480df00a45ab5a0978cb2586dddf2";
|
||||
sha256 = "SNGb25nlcR/zWnAv8Q+vLBMzaJpVPPdJ8txCkf+aD34=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter";
|
||||
};
|
||||
nvim-ts-rainbow = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-ts-rainbow";
|
||||
version = "1648928541";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "p00f";
|
||||
repo = "nvim-ts-rainbow";
|
||||
rev = "dee11b86ae2419e3f7484197c597a0e634a37a56";
|
||||
sha256 = "/qKBx3P115rk0kbvwdYXriGplNtD88cUJVGS3itFu+Y=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/p00f/nvim-ts-rainbow";
|
||||
};
|
||||
playground = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "playground";
|
||||
version = "1648628752";
|
||||
|
@ -147,12 +147,12 @@
|
|||
};
|
||||
telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "telescope.nvim";
|
||||
version = "1648744958";
|
||||
version = "1648985613";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-telescope";
|
||||
repo = "telescope.nvim";
|
||||
rev = "d38ad438f3bb4e3721b9964172c8c9d70d5d06a8";
|
||||
sha256 = "RVkh+BMiDPpY+o6Ao9KAO6AXB77hHEHJMLNLWj5dmSE=";
|
||||
rev = "6e7ee3829225d5c97c1ebfff686050142ffe5867";
|
||||
sha256 = "iinltnvBuJMf8tgAF/9UIkFaEwx/d2lFJ0oSSuUwm2I=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/nvim-telescope/telescope.nvim";
|
||||
|
@ -188,30 +188,6 @@
|
|||
};
|
||||
meta.homepage = "https://github.com/nvim-telescope/telescope-ui-select.nvim";
|
||||
};
|
||||
project-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "project.nvim";
|
||||
version = "1642582804";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ahmedkhalf";
|
||||
repo = "project.nvim";
|
||||
rev = "cef52b8da07648b750d7f1e8fb93f12cb9482988";
|
||||
sha256 = "BrseGCUZV689EbeLAme2PBeWOerwDV3lGaRTihS4l+M=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/ahmedkhalf/project.nvim";
|
||||
};
|
||||
todo-comments-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "todo-comments.nvim";
|
||||
version = "1642601933";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "folke";
|
||||
repo = "todo-comments.nvim";
|
||||
rev = "98b1ebf198836bdc226c0562b9f906584e6c400e";
|
||||
sha256 = "8uj5TxO9XZlSCB4lVRbKRc1IlUEKcBf/4bDviwuxEgs=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/folke/todo-comments.nvim";
|
||||
};
|
||||
nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-lspconfig";
|
||||
version = "1648480371";
|
||||
|
@ -226,40 +202,16 @@
|
|||
};
|
||||
null-ls-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "null-ls.nvim";
|
||||
version = "1648575967";
|
||||
version = "1649122832";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jose-elias-alvarez";
|
||||
repo = "null-ls.nvim";
|
||||
rev = "0292b2283f6fdf6cd4f954219f97b1ab7d6df5a5";
|
||||
sha256 = "yMit+SS1So6ozranmdwuqyZhjLrhkVZ2VACspt+H8P4=";
|
||||
rev = "f3107c3b211d62f53d34cbf0ca100fc948bc42d4";
|
||||
sha256 = "QpQqE7RrxhWpcY2HTyyoD9BkbQObS/nwV8khkSErpR8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/jose-elias-alvarez/null-ls.nvim";
|
||||
};
|
||||
trouble-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "trouble.nvim";
|
||||
version = "1647585739";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "folke";
|
||||
repo = "trouble.nvim";
|
||||
rev = "691d490cc4eadc430d226fa7d77aaa84e2e0a125";
|
||||
sha256 = "oUf8YbJ9HmSLN8o2c7CXzCYPu7PwKzvVKNiM9HtHQbQ=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/folke/trouble.nvim";
|
||||
};
|
||||
lspkind-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "lspkind-nvim";
|
||||
version = "1644054955";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "onsails";
|
||||
repo = "lspkind-nvim";
|
||||
rev = "93e98a0c900327ce7e9be1cbf24aebbe7170e375";
|
||||
sha256 = "0103K5lnzWCyuT/qwiBUo5PJ7lUX7fo+zNeEnQClI7A=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/onsails/lspkind-nvim";
|
||||
};
|
||||
virtual-types-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "virtual-types.nvim";
|
||||
version = "1647533682";
|
||||
|
@ -272,30 +224,6 @@
|
|||
};
|
||||
meta.homepage = "https://github.com/jubnzv/virtual-types.nvim";
|
||||
};
|
||||
lsp-status-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "lsp-status.nvim";
|
||||
version = "1638992828";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-lua";
|
||||
repo = "lsp-status.nvim";
|
||||
rev = "4073f766f1303fb602802075e558fe43e382cc92";
|
||||
sha256 = "5K7AtqAAiuma1bHba2ijbfHKWr9r7Dxd8BfGU2zxLKo=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/nvim-lua/lsp-status.nvim";
|
||||
};
|
||||
vim-illuminate = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "vim-illuminate";
|
||||
version = "1647200963";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "RRethy";
|
||||
repo = "vim-illuminate";
|
||||
rev = "487563de7ed6195fd46da178cb38dc1ff110c1ce";
|
||||
sha256 = "OqmW38YUWiTD9wcjmMnQNksWnLueeyRQz+zi/gL+l8w=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/RRethy/vim-illuminate";
|
||||
};
|
||||
nvim-cmp = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-cmp";
|
||||
version = "1648830769";
|
||||
|
@ -334,12 +262,12 @@
|
|||
};
|
||||
LuaSnip = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "LuaSnip";
|
||||
version = "1648820436";
|
||||
version = "1649161648";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "L3MON4D3";
|
||||
repo = "LuaSnip";
|
||||
rev = "eb5b77e7927e4b28800b4f40c5507d6396b7eeaf";
|
||||
sha256 = "C01ls/H/uuycWmNk8RPyL1xLeptJSyELznoyMVPLUg4=";
|
||||
rev = "69cb81cf7490666890545fef905d31a414edc15b";
|
||||
sha256 = "aEkDqez8xUpikaq+LI7Rmx+xk24wmlGmibnDKSk3SLY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/L3MON4D3/LuaSnip";
|
||||
|
@ -430,12 +358,12 @@
|
|||
};
|
||||
nvim-autopairs = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-autopairs";
|
||||
version = "1648179861";
|
||||
version = "1648883443";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "windwp";
|
||||
repo = "nvim-autopairs";
|
||||
rev = "f3ebca37d6ef1ff22d1f2c764a9e619d1fe5f3c7";
|
||||
sha256 = "4bNdIigt79vahqiuA4yn4gMSB4GHeMIjnGD8WIrUvXA=";
|
||||
rev = "06535b1f1aefc98df464d180efa693bb696736c4";
|
||||
sha256 = "5OPDNjaCo9O1FnTddkHJLrbIAEg5gFwdKkzocdU2MYo=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/windwp/nvim-autopairs";
|
||||
|
@ -452,18 +380,6 @@
|
|||
};
|
||||
meta.homepage = "https://github.com/windwp/nvim-ts-autotag";
|
||||
};
|
||||
Comment-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "Comment.nvim";
|
||||
version = "1648789182";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "numToStr";
|
||||
repo = "Comment.nvim";
|
||||
rev = "546c4875145d5a9216f4a67e5a4dc8d03d7e42bc";
|
||||
sha256 = "Xlo3XcwERze2QViasvnNUY9sWkwUjBlpY4uXSAhI1Xk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/numToStr/Comment.nvim";
|
||||
};
|
||||
nvim-treesitter-textobjects = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-treesitter-textobjects";
|
||||
version = "1648520193";
|
||||
|
@ -512,18 +428,6 @@
|
|||
};
|
||||
meta.homepage = "https://github.com/akinsho/bufferline.nvim";
|
||||
};
|
||||
nvim-tree-lua = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nvim-tree.lua";
|
||||
version = "1648575771";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kyazdani42";
|
||||
repo = "nvim-tree.lua";
|
||||
rev = "5958fd5d068877fbf3d083abff03dccb4d8286a1";
|
||||
sha256 = "JHw+G2kAKpxSmsmhN4RXQKKPhAsXfeYNugnEHGsQbIQ=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/kyazdani42/nvim-tree.lua";
|
||||
};
|
||||
indent-blankline-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "indent-blankline.nvim";
|
||||
version = "1648432344";
|
||||
|
@ -562,12 +466,12 @@
|
|||
};
|
||||
gitsigns-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "gitsigns.nvim";
|
||||
version = "1648714754";
|
||||
version = "1648922715";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lewis6991";
|
||||
repo = "gitsigns.nvim";
|
||||
rev = "9c0fb1a1c7c2770b8fe6cd923cc4d173972cff0b";
|
||||
sha256 = "wIPgSwFsTM3LnHGrzop5k3jSpApUOaw0qMVGz+Qs56k=";
|
||||
rev = "83ab3ca26ff5038f823060dfddda7a053e579b67";
|
||||
sha256 = "9++DoH1AiHuyv8N5aQ3Xob8bKiswWQfgISfxkK2ZP8M=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/lewis6991/gitsigns.nvim";
|
||||
|
@ -608,16 +512,4 @@
|
|||
};
|
||||
meta.homepage = "https://github.com/LumaKernel/nvim-visual-eof.lua";
|
||||
};
|
||||
FTerm-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "FTerm.nvim";
|
||||
version = "1647158214";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "numToStr";
|
||||
repo = "FTerm.nvim";
|
||||
rev = "233633a5f6fe8398187a4eba93eba0828ef3d5f3";
|
||||
sha256 = "6IZpKDw0pdBbWnCk4H7KuKcIWTwfH+NyJSr2IFKMtms=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/numToStr/FTerm.nvim";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
# Utils
|
||||
- src: nvim-lua/popup.nvim
|
||||
- src: nvim-lua/plenary.nvim
|
||||
- src: kyazdani42/nvim-web-devicons
|
||||
|
||||
# Keybindings
|
||||
- src: folke/which-key.nvim
|
||||
- src: mrjones2014/legendary.nvim
|
||||
- src: svermeulen/vim-yoink
|
||||
- src: svermeulen/vim-cutlass
|
||||
- src: svermeulen/vim-subversive
|
||||
|
@ -18,6 +17,7 @@
|
|||
|
||||
# Syntax
|
||||
- src: nvim-treesitter/nvim-treesitter
|
||||
- src: p00f/nvim-ts-rainbow
|
||||
- src: nvim-treesitter/playground
|
||||
|
||||
# Telescope
|
||||
|
@ -32,17 +32,11 @@
|
|||
mv lib/libzf.so lib/libzf-osx-arm64.so
|
||||
rm -rf ./xdg_cache
|
||||
- src: nvim-telescope/telescope-ui-select.nvim
|
||||
- src: ahmedkhalf/project.nvim
|
||||
- src: folke/todo-comments.nvim
|
||||
|
||||
# # LSP
|
||||
- src: neovim/nvim-lspconfig
|
||||
- src: jose-elias-alvarez/null-ls.nvim
|
||||
- src: folke/trouble.nvim
|
||||
- src: onsails/lspkind-nvim
|
||||
- src: jubnzv/virtual-types.nvim
|
||||
- src: nvim-lua/lsp-status.nvim
|
||||
- src: RRethy/vim-illuminate
|
||||
|
||||
# cmp
|
||||
- src: hrsh7th/nvim-cmp
|
||||
|
@ -61,9 +55,6 @@
|
|||
- src: windwp/nvim-autopairs
|
||||
- src: windwp/nvim-ts-autotag
|
||||
|
||||
# Comments
|
||||
- src: numToStr/Comment.nvim
|
||||
|
||||
# Textobjects
|
||||
- src: nvim-treesitter/nvim-treesitter-textobjects
|
||||
|
||||
|
@ -71,7 +62,6 @@
|
|||
- src: andymass/vim-matchup
|
||||
- src: nvim-lualine/lualine.nvim
|
||||
- src: akinsho/bufferline.nvim
|
||||
- src: kyazdani42/nvim-tree.lua
|
||||
- src: lukas-reineke/indent-blankline.nvim
|
||||
- src: lukas-reineke/virt-column.nvim
|
||||
- src: TimUntersberger/neogit
|
||||
|
@ -79,4 +69,3 @@
|
|||
- src: lewis6991/spellsitter.nvim
|
||||
- src: rcarriga/nvim-notify
|
||||
- src: LumaKernel/nvim-visual-eof.lua
|
||||
- src: numToStr/FTerm.nvim
|
||||
|
|
Loading…
Reference in a new issue