Moving all the nvim files to a subdirectory and updated the deploy script.

This commit is contained in:
2024-03-04 14:08:47 -06:00
parent 3c6b5ec1e1
commit 55765e8cf6
21 changed files with 2 additions and 2 deletions

50
nvim/init.lua Normal file
View File

@@ -0,0 +1,50 @@
-- ``````````````````````````````````````````````-',~_'--```````````````````````````` ``
-- `````````````````````````````````````````````-,;iF^:;:_'`````````````````````````` ` `
-- ``````````````````````````````-`````----````--.-.,~:|>>|*\r;:_,::__,:-``-```````````````` `
-- `````````````````````-------------`----'','~;:,~,:=^^|c{jtv>i|{Pekmxr::^^;:;'```````````` ````
-- `````````````````-``----------`---.''',_;?|\^=?*|;^rv{aKk9j^^fmmXKQOw/iz/\vxFL^:-``````````` ````
-- `````````````````----`---------`--.':^:;^>JZja{k{iav|oKoUvc]*^iHgZ=L]PX9OKFUPomar`````````````````````
-- ` ````````````````------------------.',;;LJvyjj$9yr/ohot*:^:^?|veht|cved6DgR9D$amov>>:'`````````````````
-- ```````````````------------------.''..',:r^>vyyZkwoL^_;r|t|>|mx1F{ijZfjOR$wj=vK&QNNDUhgNe\_-```````````````
-- ````````````````-----------------',;:;;\veec7oj{v}\L^;;|zfj2aaov|\vc\vKD#Qe7zJlZ$heRgRHHBMe|*;'`````````````
-- `````````````````--------------.'_^|xamekKMmL\|lv?>?|;|irr/eh99Oa6OaukN88DU6MS6UXUUMQ8UHQQ#De\.`````````````
-- ``````````````````-------------.',_;?zoDHNR9Ko?\xft=r|1/vtivKQNDgM8ROQMNQOoXPKKawh&#Qghut9QQ#ki;;r^;'--`````-
-- ````````````-''',,,'--------',:^|/=icfo6eOKS/lculr\/7vyya]me#QQQQQQmKgDBOtf9ESjueyoetoeFyP6#Q#gO9P?,''-------
-- `````````-.',,;r|iFvr'-.'_'':rzoe|^r:;vvv?^/ii2E8qvi|vmo6ZDRd#Q8ZKw6KgRR96dRNZZekeeoXRMDwEqePQQQQ8wfi;'...--..
-- `````````-',_;;;L\tjaoo{i\*^||{fPZ?;;::'~;r;||\{KRHeoXZoyuZEOKDODkPewOEdRK9KKKQdhRPRENQQgKSJKeuEQQQ#D9v:''''''''
-- ````````.,_:;;/|\ySa|2XeOZOSEFrrr\>;;;;:^?>7FyZ}mOgNRH&NQQ#DHOw9PUKmmmm6Q@QgOdDNg9HHQRRHgdEZK66wjRNB#NHj*,'''''''
-- ```````,;/71/1avjEZ6ZZmHu6MNBe|rrr::;^>\SJ?FP{mS2etUD#Q@@@@@QQ&EHKmSPmOkZNNOZdN8HgDKQHBNKqHoao2mPwkRNDol/,,''''''
-- ````````.;zFmK9o{?vU9KKOQMOD#QR\r>,:::r\}oSZeF6ozaROwhafmKQ@@@@@@QQQgeRSwQQQ@#ZZP9K6&Q@QQQOmF{ofeKDPKmeUPZ\~,,,,,,,
-- `````````,?tmZS/:;zo|;|LzceQ8w$av~;r*eFoPK9PPe$hX9DeHa$kHO@@@@@@@@QQ@@@@BQ@B#PjzZyEoKNHNgNQKhmc|t22XOOeai^:~,,,,,,,
-- ```````-':^?zu\;c|fvr*xv*\|uJoojv:;|ca9OMgdKKdeZFeuO9dHRQQ9K@@@@@@@@@@@@@QOaoe6NQQQQdQQBQ6PgO$a1|JSjaZv\>;:::_~~~~~
-- `````''_;;*\Fuc^>^i|;iXv|LuJf21{i^?1FmeqKD##NNOQRE2fjKDKPSqNQ@@@@Q@@@QQQQQmuw9g#NBQNNNNNXP#RoZDKqke9m{|;:::::::____
-- ```-,;\/=*7FjF\^|c^vL|1Ju||$R#kvi\i1a9O6PoD69Ua9KkFoXDqa2NMQ@@@@@#D&PRBQQDeLzf/^zMMHODNHgP9EOQBNQQQBMSv>;:::::::::_
-- ``-~=Lcuvum6\\c>irrF2]emeaueQQQ9OKPP9K2EK2j/xjoa\lt1yZy6mXfNQgOBO1FHBQQQQQ@Ny/;]j?\Fo9DR8gB&gNN##QQQgo1*:::::::___~
-- ``,?1ouayvjr>c|>rJPMDKKeU&69DQQ#KKfwwutjDkoySSu:;:;r||z}aKS8NNR&BDN#QQQ&#Bdtg@QhEjZj6m6DHNN&OPah$UKKOPf*::::::_~~,,
-- `-:\SomOU/:^\\ou7FdHdgQ8#OXo6QQdooJ}>:,:Kqcv\;^=c*r;;^;icv}Q#NRDHjPS\/vvc]tmkK@QNq6fjox6MR$6E2oZeaOdNgX|;::::_~~,,,
-- `';\ceKODe1vFyhmSZUO6KjFKuSSx9HMPvvtz;,=O>,,,,~~__::::::*|1JhQQ#Ng]i:..,;;;:;^r;rv2fcyPoxvauS]jooX9RMRSe2vr^;_,,,,,
-- `.,;LF/av^^c9OUNge>\JFege/\}>:iuZB9\\7E#},,,~~~_::::::::::::;mQQN{ZQu::::::::::::::;^;**\\^|vvveOaP&dkOmyKHOec;,,,,
-- `_>lzv\fZutyKomhFevi7vlkcrru>c}FUQQDUKodh:~_~__:::::;;:;zdPm9kjziiKQNowc_~~~_____~?:~:;^|rr\uyo686wR&RKaaHRUPP/:,,'
-- `,r\\/jkK6q8Hjr^|Jj\z1zJPeo6wawZ$${jeOO8RowJr;;rvxL|vvoOgOt*^|c}K#QDmemwv*:,,,,,,_r,,_^r\v2yZju$#QNQOXmS2PNRUPj^'''
-- `-,:,_,::;xotli;;^r*\aPm]l{jv;:,,,,''?f6Ujj{tuKK9DNgOjc/Pquuj7?|L\^::::>v]Fi{i:,,;__:r|\>1ahweZOgNgEooOKkoRDqhu|;''
-- ``````````-~r''r^,_;r?r/?^?;::_,,,,,'-',::::^/\ueDNPL>/9g/;::::::::::::_:::~_;r^^/=^^=\\77wjwmmPD6mm6KRw}o9ROKP6z_'
-- ```````````-,;^;r?;:,'''~,''',,,,,,,,,''.',,~:vx\mO?;z\::::::::::::::::_~,,,,;|:={|>7;^||L?\v/1cvf2eo{}zv}6Rd9KD9i~
-- ```````````--','''''''''''',,,,,,,,~~~~~~'''',;\w96?;v^::::::::::::::::_~,,,,,'';^',^;;7ir:;?;^*;xeea96Z1FumUt;,:;,
-- ````````````----.'''''''''',,,,,~~~~~~___~~:::;/URUc;rF|::::::::::::::_~,,,,,,,''''',;;;'~|{1*^rc{Z2eoxaZoee?,'''''
-- `````````````----''''''''''',,,,~~~~~~~~~~,~~_::^L/~Fc^?z/;:::::::::~~,,,,,,,,,,''''''''''',:''''',rr*>/ti\^:''''.'
-- ```````````------.''',,,,,,,,,,,~~~~~,,,,,,,,,,~__:,^xl>_;z/;:::::::,,,,,,,,,,,'''''''''''''''...'.'''''',,,'''''''
-- `````````--------'''',,,,,,,,,,,,,~~,~~~~,,,,~~,,,,_~_:r?__v/:::::~,,,,,,,'''''''''''''''''''''..''''''''''''''''''
-- ```````````------''''''''',,,,,,,,,~~~~_~~~,,,~,,,,,,,':rr;;1;::_~,,,,,,'',,'''''''''''''''''''..''''''''''''''''''
-- ````````````-----''''',''',,,,,,,,,,,,~~,,,,,,,,,,,,_~'';==;}^~,,,,,,,,,'''''''''''''''''''......''''''''''''''''''
-- ```````---------.'''',,,,,,,,,,,,,,,,,,,,,,,,,,,~;^\\Jv\yweomEe2}\^;:,,,,,,,'''''''''''.......----.''''''''''''''''
-- `````-----``----'''''',,,,,,,,,,,,,,,,,,,,,,_:rc1ioP$ODh{Fj#gHBg#QQ#Kj/1?;;,,''''''''''.----------..'''''''''''''''
-- `````-----```---''''''',,,,,,,,,,,,~:_::;^>\Jt1SZmwPavoOahONONB#QQBgd8Rk&PXjFvc?;~_,''''.------`---...-.'''''''''''
--
-- Created: 7/2/2012
require('custom_functions')
require('keymappings')
require('settings')
require('autocmds')
require('lsp')
require('plugins')

6
nvim/lua/autocmds.lua Normal file
View File

@@ -0,0 +1,6 @@
-- Fix for treesitter folds, as folds are not recalculated upon buffer changes (especially when pasting text)
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufNew', 'BufWinEnter' }, {
pattern = '*',
group = vim.api.nvim_create_augroup('telescope_fold_workaround', { clear = true }),
command = 'set foldexpr=nvim_treesitter#foldexpr()',
})

View File

@@ -0,0 +1,31 @@
-- 'softrequire' provides a wrapper around the builtin require. If the require has failed in a `local mod = softrequire('m') call, a quick check of
-- 'if mod then' can wrap code dependent upon the require, and fails gracefully
local function softrequire(m)
local ok, err = pcall(require, m)
if not ok then return nil, err end
return err
end
local function execute(type)
local command_table = {
run = {
java = 'java %',
python = 'python %',
rust = 'cargo run',
},
test = {
python = 'python test',
rust = 'cargo test',
},
benchmark = {
rust = 'cargo bench',
},
}
vim.api.nvim_command('write')
local command = command_table[type][vim.bo.filetype]
if command ~= nil then
vim.cmd('FloatermNew --autoclose=0 ' .. command)
end
end

52
nvim/lua/keymappings.lua Normal file
View File

@@ -0,0 +1,52 @@
local cf = require('custom_functions')
vim.g.mapleader = ','
-- Standard keybinding options
local options = { noremap = true }
-- Block tab/untab without leaving visual mode
vim.keymap.set('v', '<', '<gv', options)
vim.keymap.set('v', '>', '>gv', options)
-- Visual selection can be moved up and down
vim.keymap.set('v', 'J', ':m \'>+1<CR>gv=gv')
vim.keymap.set('v', 'K', ':m \'<-2<CR>gv=gv')
-- Sort selected lines alphabetically, descending
vim.keymap.set('v', '<leader>s', ':sort<CR>', options)
-- Move between panes in Neovim
vim.keymap.set('n', '<C-j>', '<C-w>j', options)
vim.keymap.set('n', '<C-k>', '<C-w>k', options)
vim.keymap.set('n', '<C-h>', '<C-w>h', options)
vim.keymap.set('n', '<C-l>', '<C-w>l', options)
-- Don't move the cursor when appending the following line to the current
vim.keymap.set('n', 'J', 'mzJ`z')
-- Switch or close buffers in the window
vim.keymap.set('n', '<leader>n', ':bn<CR>', options)
vim.keymap.set('n', '<leader>p', ':bp<CR>', options)
vim.keymap.set('n', '<leader>d', ':bp|bd #<CR>', options)
-- Toggle spellcheck
vim.keymap.set('n', '<leader>s', ':set spell!<CR>', options)
-- Quick exit from Insert mode
vim.keymap.set('i', 'jk', '<ESC>', options)
-- Toggle display of whitespace chars
vim.keymap.set('n', '<leader>w', ':set list!<CR>', options)
-- Folding the section under the cursor
vim.keymap.set('n', '<space>', 'za')
-- Keymaps for custom functions
vim.keymap.set('n', '<leader>et', function() cf.execute('test') end)
vim.keymap.set('n', '<leader>er', function() cf.execute('run') end)
vim.keymap.set('n', '<leader>eb', function() cf.execute('benchmark') end)
vim.keymap.set('n', '<leader>eo', ':Lexplore<CR>', options)
vim.keymap.set('n', '<leader>rn', ':%s/<c-r><c-w>//g<Left><Left>', options)

8
nvim/lua/lsp.lua Normal file
View File

@@ -0,0 +1,8 @@
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,
}
)

35
nvim/lua/plugins.lua Normal file
View File

@@ -0,0 +1,35 @@
-- use 'tpope/vim-fugitive' -- Git integration
--
-- -- Experimental
-- use 'mfussenegger/nvim-dap'
-- use 'rcarriga/nvim-dap-ui'
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
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'),
require('plugins/mason'),
require('plugins/gruvbox'),
require('plugins/comment'),
require('plugins/treesitter'),
require('plugins/vim-gitgutter'),
require('plugins/luasnip'),
require('plugins/nvim-cmp'),
require('plugins/lualine'),
require('plugins/telekasten'),
require('plugins/telescope'),
'tpope/vim-surround',
require('plugins/floaterm'),
require('plugins/vim-godot'),
})

View File

@@ -0,0 +1,16 @@
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

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

View File

@@ -0,0 +1,11 @@
return {
'ellisonleao/gruvbox.nvim',
config = function()
require('gruvbox').setup({
contrast = 'hard',
})
vim.cmd([[colorscheme gruvbox]])
end,
lazy = false,
priority = 1000,
}

View File

@@ -0,0 +1,4 @@
return {
'neovim/nvim-lspconfig',
lazy = false,
}

View File

@@ -0,0 +1,18 @@
return {
'nvim-lualine/lualine.nvim',
config = function()
require('lualine').setup {
tabline = {
lualine_a = {
'tabs',
},
lualine_z = {
'buffers',
}
}
}
end,
dependencies = {
'nvim-tree/nvim-web-devicons'
},
}

View File

@@ -0,0 +1,10 @@
return {
'L3MON4D3/LuaSnip',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
dependencies = {
'saadparwaiz1/cmp_luasnip', -- Wrapper to load snippets in nvim-cmp
'rafamadriz/friendly-snippets',
},
}

View File

@@ -0,0 +1,95 @@
return {
'williamboman/mason.nvim',
config = function()
require('mason').setup()
local mason_lspconfig = require('mason-lspconfig')
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- All functions and keymaps contained here are universal to LSPs
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- 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', 'gl', vim.diagnostic.open_float, 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', '<leader>D', vim.lsp.buf.type_definition, bufopts)
-- vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader><leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
-- DAP debug
-- if dap then
-- vim.keymap.set('n', '<F5>', function() dap.continue() end, bufopts)
-- vim.keymap.set('n', '<F10>', function() dap.step_over() end, bufopts)
-- vim.keymap.set('n', '<F11>', function() dap.step_into() end, bufopts)
-- vim.keymap.set('n', '<F12>', function() dap.step_out() end, bufopts)
-- vim.keymap.set('n', '<leader>b', function() dap.toggle_breakpoint() end, bufopts)
-- end
end
mason_lspconfig.setup {
automatic_installation = true,
}
local lspconfig = require('lspconfig')
mason_lspconfig.setup_handlers {
function(server_name)
lspconfig[server_name].setup {
capabilities = capabilities,
on_attach = on_attach
}
end,
['rust_analyzer'] = function()
lspconfig.rust_analyzer.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {
['rust-analyzer'] = {
checkOnSave = true,
check = {
command = 'clippy',
extraArgs = { '--', '-Dclippy::all', '-Wclippy::pedantic' },
},
diagnostics = {
enable = true,
experimental = {
enable = true,
}
}
}
}
}
end,
['lua_ls'] = function()
lspconfig.lua_ls.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
}
end,
}
end,
dependencies = {
'williamboman/mason-lspconfig.nvim'
},
}

View File

@@ -0,0 +1,90 @@
return {
'hrsh7th/nvim-cmp',
config = function()
local cmp = require('cmp')
cmp.setup {
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
completion = {
completeopt = 'menu,menuone,noinsert',
},
experimental = {
ghost_text = true,
},
mapping = {
['<c-n>'] = cmp.mapping.select_next_item(),
['<c-p>'] = cmp.mapping.select_prev_item(),
['<c-j>'] = cmp.mapping.scroll_docs(-4),
['<c-k>'] = cmp.mapping.scroll_docs(4),
['<c-space>'] = cmp.mapping.complete(),
['<c-y>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true,
}),
},
formatting = {
format = function(entry, vim_item)
vim_item.menu = ({
buffer = '[Buf]',
luasnip = '[Snips]',
nvim_lsp = '[LSP]',
nvim_lua = '[Lua]',
})[entry.source.name]
return vim_item
end,
field = { 'abbr', 'kind', 'menu' }
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
}, {
{ name = 'buffer' },
})
}
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'buffer' },
}, {
{ name = '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

@@ -0,0 +1,30 @@
return {
'renerocksai/telekasten.nvim',
config = function()
local home = vim.fn.expand('~/.zettelkasten')
require('telekasten').setup({
home = home,
dailies = home .. '/' .. 'daily',
weeklies = home .. '/' .. 'weeklies',
templates = home .. '/' .. 'templates',
template_new_note = home .. '/' .. 'templates/new_note.md',
template_new_daily = home .. '/' .. 'templates/daily.md',
template_new_weekly = home .. '/' .. 'templates/weekly.md',
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' })
end,
keys = {
{ '<leader>zp', ':Telekasten panel<CR>' },
{ '<leader>zn', ':Telekasten find_notes<CR>' },
{ '<leader>zt', ':Telekasten show_tags<CR>' },
},
-- lazy = false
}

View File

@@ -0,0 +1,46 @@
return {
'nvim-telescope/telescope.nvim',
config = function()
local actions = require('telescope.actions')
require('telescope').setup {
defaults = {
file_ignore_patterns = {
'.png$',
'.jpg$',
'.jpeg$',
'.ico$',
'.icns$',
'.webp$',
'.uproject$',
'-workspace$',
},
-- layout_strategy = 'vertical',
-- layout_config = {
-- height = 0.0
-- },
results_title = false,
prompt_prefix = '',
selection_caret = '',
mappings = {
i = {
['<ESC>'] = actions.close
},
},
},
}
end,
dependencies = {
'nvim-lua/plenary.nvim'
},
keys = {
{ '<leader>ff', '<cmd>Telescope find_files<CR>' },
{ '<leader>fg', '<cmd>Telescope git_commits<CR>' },
{ '<leader>fh', '<cmd>Telescope help_tags<CR>' },
{ '<leader>fr', '<cmd>Telescope live_grep<CR>' },
{ '<leader>fm', '<cmd>Telescope marks<CR>' },
{ '<leader>fb', '<cmd>Telescope buffers<CR>' },
{ '<leader>fd', '<cmd>Telescope diagnostics<CR>' },
{ '<leader>fs', '<cmd>Telescope lsp_document_symbols<CR>' },
{ '<leader>fw', '<cmd>Telescope lsp_dynamic_workspace_symbols<CR>' },
},
}

View File

@@ -0,0 +1,45 @@
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',
'html',
'java',
'javascript',
'json',
'lua',
'python',
'query',
'rust',
'toml',
'tsx',
'typescript',
'yaml',
},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
},
indent = {
enable = true,
},
rainbow = {
enable = true,
}
}
-- require('nvim-treesitter.install').prefer_git = true
-- TSUpdate
end,
lazy = false,
}

View File

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

View File

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

33
nvim/lua/settings.lua Normal file
View File

@@ -0,0 +1,33 @@
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.colorcolumn = '121' -- Highlight column to show
vim.opt.completeopt = 'menu,menuone,noinsert' -- Change how the completion menu is interacted with
vim.opt.cursorline = true -- Highlight the line the cursor is on.
vim.opt.expandtab = true -- Expand tabs into spaces
vim.opt.fileformat = 'unix' -- Explicitly state that files should use the unix style EOL characters.
vim.opt.fillchars = 'fold: ' -- Sets the character that fills in a fold line
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' -- Uses Treesitter to determine where code folding should occur
vim.opt.foldlevel = 10 -- Sets the initial level at which folds will be closed
vim.opt.foldmethod = 'expr' -- Attempt to use the syntax of a file to set folds.
vim.opt.formatoptions = 'cqrto' -- Allow auto insertion of comment lines when using o or O on a comment.
vim.opt.list = true -- Show the listchars
vim.opt.listchars = 'tab:|·,trail:¬,extends:>,precedes:<,nbsp:+' -- Characters to display when showing whitespace
vim.opt.mouse = 'a' -- Enable mouse mode
vim.opt.number = true -- Show the line number in the gutter.
vim.opt.relativenumber = true -- Relative line number
vim.opt.shiftround = true -- Round indentation to shiftwidth
vim.opt.shiftwidth = 4 -- Number of spaces a tab counts for when converting tabs to spaces
vim.opt.shortmess = 'at' -- Abbreviations and truncation of cmd messages
vim.opt.showmatch = true -- Show matching bracket
vim.opt.signcolumn = 'yes' -- Always show the gutter
vim.opt.smartindent = true -- Attempt to insert indentation to fit traditional languages.
vim.opt.softtabstop = 4 -- Number of spaces a tab counts for when converting tabs to spaces
vim.opt.splitbelow = true -- Split windows below when horizontal splitting
vim.opt.splitright = true -- Split windows right when vertical splitting
vim.opt.swapfile = false -- Disable the creation of swap files for open files
vim.opt.tabstop = 4 -- Setting the value of spaces per tab
vim.opt.termguicolors = true -- Enable the truecolor GUI colors in a terminal
vim.opt.undodir = os.getenv('HOME') .. '/.config/nvim/undodir' -- Set a specific undo file directory
vim.opt.undofile = true -- Enable undo files
vim.opt.updatetime = 50 -- Update time in milliseconds
vim.opt.wrap = false -- Do _not_ wrap lines