Several minor updates to refine this config

This commit is contained in:
pgfm 2022-07-07 20:15:52 -05:00
parent 2b2219e998
commit 35dd6c19c9
8 changed files with 29 additions and 38 deletions

View file

@ -1,16 +1,15 @@
-- Set the colorscheme and any related options.
-- I use dark terminals and schemes, so use a dark background.
vim.opt.background = 'dark'
-- Settings for gruvbox-material
-- vim.g.gruvbox_material_palette = 'mix'
-- vim.g.gruvbox_material_background = 'hard'
-- vim.g.gruvbox_material_enable_bold = 1
-- vim.cmd 'colorscheme gruvbox-material'
vim.g.gruvbox_material_palette = 'mix'
vim.g.gruvbox_material_background = 'hard'
vim.g.gruvbox_material_enable_bold = 1
-- Settings for material
vim.g.material_style = "palenight"
require('material').setup({
require('material').setup {
italics = {
comments = true, -- Enable italic comments
@ -24,6 +23,7 @@ require('material').setup({
nvim_navic = false,
hop = false,
}
})
}
-- Set the color scheme
vim.cmd 'colorscheme material'

View file

@ -60,6 +60,16 @@ opt.expandtab = true
opt.smarttab = true
opt.autoindent = true
-- I don't use indentation when writing HTML, and autoindentation makes any form
-- of editing flat out painful.
vim.api.nvim_create_autocmd("FileType", {
pattern = 'html',
callback = function()
vim.opt_local.autoindent = false
vim.opt_local.indentexpr = ''
end,
})
-----------------------------------------------------------
-- Memory, CPU
-----------------------------------------------------------
@ -87,27 +97,6 @@ opt.hlsearch = true
-----------------------------------------------------------
-- Startup
-----------------------------------------------------------
-- Disable nvim intro
opt.shortmess:append "sI"
-- Disable builtins plugins
local disabled_built_ins = {
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin",
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
"matchit"
}
for _, plugin in pairs(disabled_built_ins) do
g["loaded_" .. plugin] = 1
end

View file

@ -61,6 +61,9 @@ map('n', '<leader>fg', '<cmd>Telescope live_grep<CR>')
-- Metals commands
map('n', '<leader>fm', '<cmd>Telescope metals commands<CR>')
-- Search project TODOs in Telescope
map('n', '<leader>ft', '<cmd>TodoTelescope<CR>')
-----------------------------------------------------------
-- Trouble
-----------------------------------------------------------
@ -83,6 +86,9 @@ map('n', '<leader>xl', '<cmd>TroubleToggle loclist<CR>')
-- Show LSP references
map('n', '<leader>xr', '<cmd>TroubleToggle lsp_references<CR>')
-- Show project TODOs in Trouble
map('n', '<leader>xt', '<cmd>TodoTrouble<CR>')
-----------------------------------------------------------
-- Floaterm
-----------------------------------------------------------

View file

@ -71,7 +71,7 @@ return require('packer').startup(function(use)
use {
'hrsh7th/nvim-cmp',
requires = {
'hrsh7th/cmp-nvim-lsp', -- add once LSP is supported
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer'
}
@ -130,9 +130,6 @@ return require('packer').startup(function(use)
-- Improve startup time by replacing default filetype autocmds
use 'nathom/filetype.nvim'
-- Improve the core vim.ui
use 'stevearc/dressing.nvim'
-- Special highlighting and tracking for certain notable words
use {
'folke/todo-comments.nvim',

View file

@ -4,7 +4,7 @@ cmp.setup{
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' },
{ name = 'buffer', option = { keyword_length = 3 }, },
{ name = 'buffer', option = { keyword_length = 4 }, },
},
mapping = {
['<CR>'] = cmp.mapping.confirm({}),

View file

@ -6,10 +6,10 @@ local on_attach = function(client, bufnr)
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
end
-- Advertise the nvim-cmp capabilities to LSP servers
-- Establish a set of capabilities so we can advertise nvim-cmp support.
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- nvim-cmp support.
-- Add nvim-cmp support to the capabilities.
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- zls = zig language server

View file

@ -1,4 +1,3 @@
-- Awaiting metals setup
local function metals_status_for_lualine()
return vim.g["metals_status"] or ""
end

View file

@ -1,7 +1,7 @@
require'nvim-treesitter.configs'.setup {
-- One of "all", "maintained", or a list of languages
ensure_installed = {
"c", "zig", "bash", "scala", "yaml", "html", "css", "javascript",
"c", "zig", "bash", "scala", "yaml", "css", "javascript",
"latex", "clojure", "lua", "cpp"
},