feat: A working state during the transfer between the old neovim

configurations and using newer built-in functionality in the 0.12.x
versions of Neovim.

Further work is needed for treesitter updates, cleanup of the conversion
work and testing to verify old functionality isn't lessened to get the
benefits of a cleaner config and vastly faster load times.
This commit is contained in:
2026-05-23 20:28:34 -05:00
parent deea09dac5
commit abe81c01b3
28 changed files with 490 additions and 609 deletions

View File

@@ -92,8 +92,8 @@ The config adds the following settings outside of oh-my-zsh:
- User $HOME based `.local/bin`
- Keychain initialization for caching SSH keys
- Adding a timing function for checking ZSH load timing
- Local specific configuration file loading, with three initial configs:
- `.zsh_aliases`: Aliases for local specific commands
- `.zsh_exports`: Exported variables for a specific system
- `.zsh_functions`: Custom functions
- `.zsh_local`: Local ZSH settings for a specific system such as any environment specific bash required to set up a system's shell or direct ZSH settings
- Split configuration file loading with three main configs and a local override:
- `zsh_aliases`: Aliases for common commands
- `zsh_exports`: Exported variables for the system
- `zsh_functions`: Custom functions beyond simple aliasing can fulfill but not requiring a script
- `zsh_local`: Local ZSH settings for a specific system such as any environment specific bash required to set up a system's shell or direct ZSH settings

View File

@@ -42,13 +42,11 @@
--
-- Created: 7/2/2012
-- local vim = vim
vim.loader.enable()
require('custom_functions')
require('custom_commands')
require('plugins')
require('language_support')
require('autocmds')
require('keymappings')
require('settings')
require('autocmds')
require('lsp')
require('plugins')

View File

@@ -1,5 +1,5 @@
vim.api.nvim_create_user_command('FindAndReplace', function(opts)
-- Update each quickfix location using substitute, update the files to save changes, close the opened buffers and close the quickfix window
-- TODO: Does not close the buffers opened through changes
vim.api.nvim_command(string.format('cdo s/%s/%s/g', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
vim.api.nvim_command(string.format('cfdo s/%s/%s/gc', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
end, { nargs = '*' })

View File

@@ -1,5 +1,6 @@
return {
execute = function(type)
-- Mapping of filetypes to commands
local command_table = {
build = {
rust = 'cargo build',
@@ -21,11 +22,15 @@ return {
cpp = 'make upload',
}
}
-- Save the file
vim.api.nvim_command('write')
local command = command_table[type][vim.bo.filetype]
if command ~= nil then
vim.cmd('FloatermNew --autoclose=0 --height=0.9 --width=0.9 ' .. command)
-- Run command in a new terminal buffer
vim.cmd('terminal ' .. command)
end
end
}

View File

@@ -50,6 +50,10 @@ vim.keymap.set('n', '<leader>w', ':set list!<CR>', options)
-- Folding the section under the cursor
vim.keymap.set('n', '<space>', 'za')
-- Comment toggling
vim.keymap.set('n', '<leader>c', 'gcc', {remap=true})
vim.keymap.set('v', '<leader>c', 'gc', {remap=true})
-- Keymaps for custom functions
vim.keymap.set('n', '<leader>et', function() custom_functions.execute('test') end)
vim.keymap.set('n', '<leader>er', function() custom_functions.execute('run') end)
@@ -57,6 +61,8 @@ vim.keymap.set('n', '<leader>ec', function() custom_functions.execute('compile')
vim.keymap.set('n', '<leader>eb', function() custom_functions.execute('benchmark') end)
vim.keymap.set('n', '<leader>eu', function() custom_functions.execute('upload') end)
-- Netrw directory exploration
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)
vim.keymap.set('n', '<leader>l', ':Lazy<CR>', options)
-- Allow for leaving Terminal mode using the escape key instead of the odd default
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>')

View File

@@ -0,0 +1,77 @@
-- Treesitter
-- def tsi [parser: string] {
-- let tree = $"($env.HOME)/.local/share/nvim/site"
-- luarocks $"--tree=($tree)" install $"tree-sitter-($parser)"
-- }
local rocks_path = vim.fn.stdpath("data") .. "/site/lib/luarocks/rocks-5.1"
vim.api.nvim_create_autocmd("FileType", {
callback = function (args)
pcall(vim.treesitter.start, args.buf)
end
})
vim.diagnostic.config({
underline = true,
virtual_text = {
prefix = "",
source = 'always',
},
-- signs = true,
severity_sort = true,
-- update_in_insert = true,
float = {
source = 'always'
}
})
-- LSP
vim.pack.add({
'https://github.com/neovim/nvim-lspconfig',
})
-- Auto set keymaps and other settings on LSP attach
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my.lsp', {}),
callback = function(args)
-- Native completion
-- local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
-- local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end
-- client.server_capabilities.completionProvider.triggerCharacters = chars
--
-- vim.lsp.completion.enable(true, args.data.client_id, args.buf, {
-- autotrigger = true,
-- convert = function(item)
-- local abbr = item.label
-- abbr = abbr:gsub("%b()", ""):gsub("%b{}", "")
-- abbr = abbr:match("[%w_.]+.*") or abbr
-- abbr = #abbr > 20 and abbr:sub(1, 19) .. "..." or abbr
--
-- return { abbr = abbr }
-- end,
-- })
-- Keyboard Mappings
local bufnr = args.buf
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<C-[>', vim.diagnostic.goto_prev, bufopts)
vim.keymap.set('n', '<C-]>', vim.diagnostic.goto_next, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gs', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader><leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
vim.keymap.set('i', '<c-space>', vim.lsp.completion.get, bufopts)
end,
})
-- Enable LSP engines
-- vim.lsp.enable('clangd')
vim.lsp.enable('gdscript')

View File

@@ -1,8 +0,0 @@
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true,
virtual_text = true,
signs = true,
update_in_insert = true,
}
)

View File

@@ -1,41 +1,43 @@
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
require('vim._core.ui2').enable()
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
require('plugins.lspconfig'), -- LSP configuration
require('plugins.mason'), -- LSP and DAP manager
require('plugins.gruvbox'), -- Colorscheme
require('plugins.comment'), -- Simple language specific commenting shortcuts
require('plugins.dap'), -- DAP debugging plugin
require('plugins.dap-python'), -- Debug plugin settings specifically for python
require('plugins.treesitter'), -- Treesitter syntax highlighting and tree support
require('plugins.gitsigns'), -- Gutter symbols for Git status and quick actions for Git operations
require('plugins.luasnip'), -- Snippet engine
-- require('plugins.nvim-lint'), -- Linter loader
require('plugins.nvim-cmp'), -- Autocompletion engine
require('plugins.lualine'), -- Status line
require('plugins.telekasten'), -- Note taking setup
require('plugins.telescope'), -- Floating windows for searching and other operations
'tpope/vim-surround', -- Change surrounding symbols
require('plugins.floaterm'), -- Floating terminal
require('plugins.vim-godot'), -- Godot specific bindings and debug
-- require('plugins.markdown-preview'), -- Open a preview of markdown rendered in a browser
require('plugins.render-markdown'), -- Render markdown directly in nvim (experimental, may take over for markdown-preview)
require('plugins.autopairs'), -- Autocomplete symbol pairs when typing (experimental)
require('plugins.twilight'), -- Focus mode, dim lines around the current segment of code
require('plugins.yaml-companion'), -- Additional YAML and JSON schema helper
require('plugins.fugitive'), -- _The_ Git integration plugin people have been using forever
-- require('plugins.schemastore'), -- Loads YAML and JSON schemas for autocompletion
-- Load the following plugins eagerly to prevent visual oddities
vim.pack.add({
'https://github.com/sainnhe/gruvbox-material',
})
vim.g.gruvbox_material_enable_italic = true
vim.g.gruvbox_material_background = 'hard'
vim.g.gruvbox_material_better_performance = 1
vim.cmd.colorscheme('gruvbox-material')
require('plugins.lualine') -- Status line plugin
-- vim.schedule defers plugin loading for after the main loop starts
-- Startup is cleaner and faster than ever
vim.schedule(function ()
require('plugins.gitsigns') -- Git gutter notifiers
require('plugins.nvim-cmp') -- Autocompletion plugin (TODO: Move to builtin completion?)
require('plugins.telescope') -- Floating window fuzzy searching different sources
require('plugins.telekasten') -- Note taking plugins
require('plugins.mason') -- LSP and DAP manager
require('plugins.twilight') -- Focus mode, dim lines around the cursor's location
require('plugins.render-markdown') -- Render markdown directly in neovim
require('plugins.luasnip') -- Snippet engine
require('plugins.treesitter') -- Syntax highlighting and tree support
vim.pack.add({'https://github.com/windwp/nvim-autopairs'}) -- Autocomplete symbol pairs when typing
vim.pack.add({'https://github.com/tpope/vim-surround'}) -- Change surrounding characters (doesn't need setup called)
vim.pack.add({'https://github.com/habamax/vim-godot'}) -- Godot specific bindings and debug
require('nvim-autopairs').setup()
end)
-- TODO: Still in need of translation to the new setup
-- require('plugins.dap'), -- DAP debugging plugin
-- require('plugins.dap-python'), -- Debug plugin settings specifically for python
-- require('plugins.yaml-companion'), -- Additional YAML and JSON schema helper
-- Currently not enabled
-- require('plugins.nvim-lint'), -- Linter loader
-- require('plugins.fugitive'), -- _The_ Git integration plugin people have been using forever
-- require('plugins.schemastore'), -- Loads YAML and JSON schemas for autocompletion

View File

@@ -1,6 +0,0 @@
return {
'windwp/nvim-autopairs',
config = function()
require('nvim-autopairs').setup()
end
}

View File

@@ -1,16 +0,0 @@
return {
'numToStr/Comment.nvim',
config = function()
require('Comment').setup {
ignore = '^$',
toggler = {
line = 'gc',
block = '<nop>',
},
}
end,
keys = {
{ '<leader>c', ':norm gcc<CR>' },
{ '<leader>c', ':norm gc<CR>', mode = 'v' },
}
}

View File

@@ -1,8 +0,0 @@
return {
'voldikss/vim-floaterm',
keys = {
{ 't', ':FloatermToggle myfloat<CR>' },
{ '<ESC>', '<C-\\><C-n>:q<CR>', mode = 't' },
},
lazy = false,
}

View File

@@ -1,10 +1,12 @@
return {
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup {
vim.pack.add({
'https://github.com/lewis6991/gitsigns.nvim'
})
require('gitsigns').setup {
on_attach = function(bufnr)
local gitsigns = require('gitsigns')
-- TODO: Move to custom functions?
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
@@ -47,6 +49,4 @@ return {
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end
}
end,
}

View File

@@ -1,10 +0,0 @@
return {
'sainnhe/gruvbox-material',
config = function()
vim.g.gruvbox_material_enable_italic = true
vim.g.gruvbox_material_background = 'hard'
vim.cmd.colorscheme('gruvbox-material')
end,
lazy = false,
priority = 1000,
}

View File

@@ -1,39 +0,0 @@
return {
'neovim/nvim-lspconfig',
config = function()
vim.diagnostic.config({
virtual_text = {
source = 'always',
},
severity_sort = true,
float = {
source = 'always'
}
})
-- Auto set keymaps and other settings on LSP attach
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my.lsp', {}),
callback = function(args)
local bufnr = args.buf
-- Keyboard Mappings
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<C-[>', vim.diagnostic.goto_prev, bufopts)
vim.keymap.set('n', '<C-]>', vim.diagnostic.goto_next, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gs', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader><leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
end,
})
vim.lsp.enable('gdscript')
end
}

View File

@@ -6,10 +6,12 @@ local function get_schema()
return schema.result[1].name
end
return {
'nvim-lualine/lualine.nvim',
config = function()
require('lualine').setup {
vim.pack.add({
'https://github.com/nvim-tree/nvim-web-devicons',
'https://github.com/nvim-lualine/lualine.nvim'
})
require('lualine').setup {
tabline = {
lualine_a = {
'tabs',
@@ -23,9 +25,4 @@ return {
'encoding', 'fileformat', 'filetype', get_schema
},
}
}
end,
dependencies = {
'nvim-tree/nvim-web-devicons'
},
}

View File

@@ -1,12 +1,20 @@
return {
'L3MON4D3/LuaSnip',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
require('luasnip.loaders.from_lua').lazy_load({ paths = "./snippets" })
end,
dependencies = {
'saadparwaiz1/cmp_luasnip', -- Wrapper to load snippets in nvim-cmp
'rafamadriz/friendly-snippets',
},
build = "make install_jsregexp"
}
vim.pack.add({
'https://github.com/saadparwaiz1/cmp_luasnip',
'https://github.com/rafamadriz/friendly-snippets',
'https://github.com/L3MON4D3/LuaSnip'
})
local luasnip_lua_path = vim.api.nvim_get_runtime_file('lua/luasnip/init.lua', false)[1]
if not luasnip_lua_path then return end
local luasnip_root = vim.fn.fnamemodify(luasnip_lua_path, ':h:h:h')
vim.api.nvim_create_autocmd('PackChanged', { callback = function(args)
local name, kind = args.data.spec.name, args.data.kind
if name == 'luasnip' and kind == 'update' then
if not args.data.active then vim.cmd.packadd('luasnip') end
vim.system({'make', 'install_jsregexp'}, { cwd = luasnip_root })
end
end})
require('luasnip.loaders.from_vscode').lazy_load()
require('luasnip.loaders.from_lua').lazy_load({ paths = "./snippets" })

View File

@@ -1,15 +0,0 @@
return {
'iamcco/markdown-preview.nvim',
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
ft = { 'markdown' },
build = function()
vim.fn['mkdp#util#install']()
end,
keys = {
{
'<leader>md',
':MarkdownPreviewToggle<CR>',
desc = 'Toggles Markdown preview service'
}
},
}

View File

@@ -1,9 +1,10 @@
return {
'mason-org/mason.nvim',
config = function()
require('mason').setup()
vim.pack.add({
'https://github.com/mason-org/mason.nvim',
'https://github.com/mason-org/mason-lspconfig.nvim',
})
require('mason-lspconfig').setup {
require('mason').setup()
require('mason-lspconfig').setup {
automatic_enable = true,
ensure_installed = {
'ansiblels', -- Ansible
@@ -18,10 +19,4 @@ return {
'ts_ls', -- Typscript
'yamlls', -- YAML
}
}
end,
dependencies = {
'mason-org/mason-lspconfig.nvim',
},
lazy = false,
}

View File

@@ -1,8 +1,15 @@
return {
'hrsh7th/nvim-cmp',
config = function()
local cmp = require('cmp')
cmp.setup {
vim.pack.add({
'https://github.com/hrsh7th/nvim-cmp',
'https://github.com/hrsh7th/cmp-nvim-lsp',
'https://github.com/hrsh7th/cmp-buffer',
'https://github.com/hrsh7th/cmp-path',
'https://github.com/hrsh7th/cmp-cmdline',
'https://github.com/hrsh7th/cmp-nvim-lua',
})
local cmp = require('cmp')
cmp.setup {
completion = {
completeopt = 'menu,menuone,noinsert',
},
@@ -40,31 +47,20 @@ return {
}, {
{ name = 'buffer' },
})
}
}
cmp.setup.cmdline(':', {
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
}, {
{ name = 'cmdline' },
})
})
})
cmp.setup.cmdline({ '/', '?' }, {
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
end,
dependencies = {
{ 'hrsh7th/cmp-nvim-lsp', lazy = false },
{ 'hrsh7th/cmp-buffer', lazy = false },
{ 'hrsh7th/cmp-path', lazy = false },
{ 'hrsh7th/cmp-cmdline', lazy = false },
{ 'L3MON4D3/LuaSnip', lazy = false },
},
event = 'InsertEnter',
lazy = false,
}
})

View File

@@ -1,7 +1,8 @@
return {
'meanderingprogrammer/render-markdown.nvim',
config = function()
require('render-markdown').setup({
vim.pack.add({
'https://github.com/meanderingprogrammer/render-markdown.nvim'
})
require('render-markdown').setup({
enabled = true,
render_modes = { 'n', 'c', 't' },
max_file_size = 10.0,
@@ -9,6 +10,4 @@ return {
'markdown',
'telekasten'
},
})
end,
}
})

View File

@@ -2,34 +2,12 @@ function string.insert(str1, str2, pos)
return str1:sub(1, pos) .. str2 .. str1:sub(pos + 1)
end
-- function ToggleTODO(current_line)
-- local todo_str = '%- %[ %] '
-- local todo_checked_str = '%- %[x%] '
vim.pack.add({
'https://github.com/renerocksai/telekasten.nvim'
})
-- if current_line:find(todo_str, 1) then
-- return string.gsub(current_line, todo_str, '', 1)
-- elseif current_line:find(todo_checked_str, 1) then
-- return string.gsub(current_line, todo_checked_str, '', 1)
-- else
-- local first_idx = current_line:find('[%-%w]', 1) - 1
-- return string.insert(current_line, '- [ ] ', first_idx)
-- end
-- end
-- vim.api.nvim_create_user_command('ToggleTODO', function()
-- local current_line = vim.api.nvim_get_current_line()
-- local row, _ = unpack(vim.api.nvim_win_get_cursor(0))
-- local new_line = ToggleTODO(current_line)
-- vim.api.nvim_buf_set_lines(0, row - 1, row, true, { new_line })
-- end, {})
return {
'renerocksai/telekasten.nvim',
config = function()
local home = vim.fn.expand('~/.zettelkasten')
require('telekasten').setup({
local home = vim.fn.expand('~/.zettelkasten')
require('telekasten').setup({
home = home,
dailies = home .. '/' .. 'daily',
weeklies = home .. '/' .. 'weeklies',
@@ -40,20 +18,15 @@ return {
command_palette_theme = 'ivy',
show_tags_theme = 'get_cursor',
plug_into_calendar = false,
})
})
-- Color for telekasten syntax
vim.api.nvim_set_hl(0, 'tkLink', { ctermfg = 72, cterm = { bold = true, underdouble = true }, fg = '#689d6a', bold = true, underdouble = true })
vim.api.nvim_set_hl(0, 'tkBrackets', { ctermfg = 'gray', fg = 'gray' })
vim.api.nvim_set_hl(0, 'tkTag', { ctermfg = 'gray', fg = 'gray' })
-- Color for telekasten syntax
vim.api.nvim_set_hl(0, 'tkLink', { ctermfg = 72, cterm = { bold = true, underdouble = true }, fg = '#689d6a', bold = true, underdouble = true })
vim.api.nvim_set_hl(0, 'tkBrackets', { ctermfg = 'gray', fg = 'gray' })
vim.api.nvim_set_hl(0, 'tkTag', { ctermfg = 'gray', fg = 'gray' })
end,
keys = {
{ '<leader>zt', ':Telekasten toggle_todo<CR>' },
{ '<leader>zfn', ':Telekasten find_notes<CR>' },
{ '<leader>zft', ':Telekasten show_tags<CR>' },
{ '<leader>zn', ':Telekasten new_note<CR>' },
{ '<leader>zp', ':Telekasten panel<CR>' },
},
lazy = false
}
vim.keymap.set('n', '<leader>zt', ':Telekasten toggle_todo<CR>')
vim.keymap.set('n', '<leader>zf', ':Telekasten find_notes<CR>')
vim.keymap.set('n', '<leader>zn', ':Telekasten new_note<CR>')
vim.keymap.set('n', '<leader>zp', ':Telekasten panel<CR>')
vim.keymap.set('n', '<leader>zT', ':Telekasten goto_today<CR>')

View File

@@ -1,12 +1,12 @@
return {
'nvim-telescope/telescope.nvim',
config = function(_, opts)
local telescope = require('telescope')
local actions = require('telescope.actions')
local action_state = require('telescope.actions.state')
local fb_actions = telescope.extensions.file_browser.actions
vim.pack.add({
'https://github.com/kevinhwang91/nvim-bqf',
'https://github.com/nvim-telescope/telescope-file-browser.nvim',
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-telescope/telescope.nvim',
})
opts.defaults = {
require('telescope').setup {
defaults = {
file_ignore_patterns = {
'.png$',
'.jpg$',
@@ -21,10 +21,10 @@ return {
'node_modules',
},
layout_config = { prompt_position = 'bottom' },
layout_strategy = 'vertical',
-- layout_strategy = 'vertical',
mappings = {
i = {
['<ESC>'] = actions.close,
['<ESC>'] = require('telescope.actions').close,
},
},
prompt_prefix = '',
@@ -32,9 +32,8 @@ return {
selection_caret = '',
sorting_strategy = 'ascending',
winblend = 0,
}
opts.pickers = {
},
pickers = {
diagnostics = {
-- theme = 'ivy',
initial_mode = 'normal',
@@ -42,107 +41,23 @@ return {
preview_cutoff = 9999,
},
},
}
},
}
opts.extensions = {
file_browser = {
theme = 'dropdown',
hijack_netrw = true,
mappings = {
['n'] = {
['N'] = fb_actions.create,
['h'] = fb_actions.goto_parent_dir,
},
},
},
}
local builtin = require('telescope.builtin')
telescope.setup(opts)
telescope.load_extension('file_browser')
end,
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-file-browser.nvim',
'kevinhwang91/nvim-bqf',
},
keys = {
{
';f',
function()
require('telescope.builtin').find_files({
vim.keymap.set('n', ';f', function()
builtin.find_files({
no_ignore = false,
hidden = true,
})
end,
},
{
';r',
function()
require('telescope.builtin').live_grep()
end,
},
{
';b',
function()
require('telescope.builtin').buffers()
end,
},
{
';h',
function()
require('telescope.builtin').help_tags()
end,
},
{
';;',
function()
require('telescope.builtin').resume()
end,
},
{
';d',
function()
require('telescope.builtin').diagnostics()
end,
},
{
';t',
function()
require('telescope.builtin').treesitter()
end,
},
{
';s',
function()
require('telescope.builtin').lsp_document_symbols()
end
},
{
';w',
function()
require('telescope.builtin').lsp_dynamic_workspace_symbols()
end
},
{
';e',
function()
local telescope = require('telescope')
end)
local function telescope_buffer_dir()
return vim.fn.expand('%:p:h')
end
telescope.extensions.file_browser.file_browser({
path = '%:p:h',
cwd = telescope_buffer_dir(),
respect_gitignore = false,
hidden = true,
grouped = true,
previewer = false,
initial_mode = 'normal',
layout_config = { height = 40 },
})
end,
},
},
}
vim.keymap.set('n', ';r', function() builtin.live_grep() end)
vim.keymap.set('n', ';b', function() builtin.buffers() end)
vim.keymap.set('n', ';h', function() builtin.help_tags() end)
vim.keymap.set('n', ';;', function() builtin.resume() end)
vim.keymap.set('n', ';d', function() builtin.diagnostics() end)
vim.keymap.set('n', ';t', function() builtin.treesitter() end)
vim.keymap.set('n', ';s', function() builtin.lsp_document_symbols() end)
vim.keymap.set('n', ';w', function() builtin.lsp_dynamic_workspace_symbols() end)

View File

@@ -1,50 +1,55 @@
return {
'nvim-treesitter/nvim-treesitter',
build = function()
require('nvim-treesitter.install').update({ with_sync = true })
end,
config = function()
require('nvim-treesitter.configs').setup {
auto_install = true,
ensure_installed = {
'c',
'c_sharp',
'comment',
'css',
'gdscript',
'gitignore',
'html',
'java',
'javascript',
'json',
'lua',
'markdown',
'markdown_inline',
'python',
'query',
'rust',
'sql',
'tera',
'toml',
'tsx',
'typescript',
'yaml',
},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
},
indent = {
enable = true,
},
rainbow = {
enable = true,
}
}
vim.pack.add({
'https://github.com/nvim-treesitter/nvim-treesitter'
})
vim.treesitter.language.register('markdown', 'telekasten')
end,
}
-- require('nvim-treesitter.configs').setup {
-- auto_install = true,
-- ensure_installed = {
-- 'c',
-- 'c_sharp',
-- 'comment',
-- 'css',
-- 'gdscript',
-- 'gitignore',
-- 'html',
-- 'java',
-- 'javascript',
-- 'json',
-- 'lua',
-- 'markdown',
-- 'markdown_inline',
-- 'python',
-- 'query',
-- 'rust',
-- 'sql',
-- 'tera',
-- 'toml',
-- 'tsx',
-- 'typescript',
-- 'yaml',
-- },
-- highlight = {
-- enable = true,
-- additional_vim_regex_highlighting = false,
-- },
-- incremental_selection = {
-- enable = true,
-- },
-- indent = {
-- enable = true,
-- },
-- rainbow = {
-- enable = true,
-- }
-- }
vim.treesitter.language.register('markdown', 'telekasten')
-- return {
-- 'nvim-treesitter/nvim-treesitter',
-- build = function()
-- require('nvim-treesitter.install').update({ with_sync = true })
-- end,
-- config = function()
-- end,
-- }

View File

@@ -1,7 +1,8 @@
return {
'folke/twilight.nvim',
config = function()
require('twilight').setup({
vim.pack.add({
'https://github.com/folke/twilight.nvim'
})
require('twilight').setup({
dimming = {
alpha = 0.3,
},
@@ -13,9 +14,6 @@ return {
"table",
"if_statement",
}
})
end,
keys = {
{ '<leader>f', ':Twilight<CR>' }
}
}
})
vim.keymap.set('n', '<leader>f', ':Twilight<CR>')

View File

@@ -1,3 +0,0 @@
return {
'airblade/vim-gitgutter'
}

View File

@@ -1,4 +0,0 @@
return {
'habamax/vim-godot',
ft = 'gdscript',
}

View File

@@ -1,6 +1,9 @@
-- Experimental
-- vim.o.autocomplete = true
vim.opt.background = 'dark' -- Force a dark background for the colorscheme
vim.opt.clipboard = 'unnamed,unnamedplus' -- Use both the "*" and "+" registers for yanks and deletes (puts things in the system clipboard)
vim.opt.completeopt = 'menu,menuone,noinsert' -- Change how the completion menu is interacted with
vim.opt.completeopt = 'fuzzy,menuone,noinsert,popup' -- Change how the completion menu is interacted with and displays
vim.opt.cursorcolumn = true -- Highlight the column the cursor is on
vim.opt.cursorline = true -- Highlight the line the cursor is on.
vim.opt.expandtab = true -- Expand tabs into spaces

13
nvim/lua/treesitter.lua Normal file
View File

@@ -0,0 +1,13 @@
-- Treesitter
-- def tsi [parser: string] {
-- let tree = $"($env.HOME)/.local/share/nvim/site"
-- luarocks $"--tree=($tree)" install $"tree-sitter-($parser)"
-- }
local rocks_path = vim.fn.stdpath("data") .. "/site/lib/luarocks/rocks-5.1"
vim.api.nvim_create_autocmd("FileType", {
callback = function (args)
pcall(vim.treesitter.start, args.buf)
end
})