Several minor updates to refine this config
This commit is contained in:
parent
2b2219e998
commit
35dd6c19c9
8 changed files with 29 additions and 38 deletions
|
@ -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'
|
vim.opt.background = 'dark'
|
||||||
|
|
||||||
-- Settings for gruvbox-material
|
-- Settings for gruvbox-material
|
||||||
-- vim.g.gruvbox_material_palette = 'mix'
|
vim.g.gruvbox_material_palette = 'mix'
|
||||||
-- vim.g.gruvbox_material_background = 'hard'
|
vim.g.gruvbox_material_background = 'hard'
|
||||||
-- vim.g.gruvbox_material_enable_bold = 1
|
vim.g.gruvbox_material_enable_bold = 1
|
||||||
-- vim.cmd 'colorscheme gruvbox-material'
|
|
||||||
|
|
||||||
-- Settings for material
|
-- Settings for material
|
||||||
vim.g.material_style = "palenight"
|
vim.g.material_style = "palenight"
|
||||||
|
|
||||||
require('material').setup({
|
require('material').setup {
|
||||||
|
|
||||||
italics = {
|
italics = {
|
||||||
comments = true, -- Enable italic comments
|
comments = true, -- Enable italic comments
|
||||||
|
@ -24,6 +23,7 @@ require('material').setup({
|
||||||
nvim_navic = false,
|
nvim_navic = false,
|
||||||
hop = false,
|
hop = false,
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
-- Set the color scheme
|
||||||
vim.cmd 'colorscheme material'
|
vim.cmd 'colorscheme material'
|
||||||
|
|
|
@ -60,6 +60,16 @@ opt.expandtab = true
|
||||||
opt.smarttab = true
|
opt.smarttab = true
|
||||||
opt.autoindent = 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
|
-- Memory, CPU
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
@ -87,27 +97,6 @@ opt.hlsearch = true
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
-- Startup
|
-- Startup
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
-- Disable nvim intro
|
-- Disable nvim intro
|
||||||
opt.shortmess:append "sI"
|
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
|
|
||||||
|
|
|
@ -61,6 +61,9 @@ map('n', '<leader>fg', '<cmd>Telescope live_grep<CR>')
|
||||||
-- Metals commands
|
-- Metals commands
|
||||||
map('n', '<leader>fm', '<cmd>Telescope metals commands<CR>')
|
map('n', '<leader>fm', '<cmd>Telescope metals commands<CR>')
|
||||||
|
|
||||||
|
-- Search project TODOs in Telescope
|
||||||
|
map('n', '<leader>ft', '<cmd>TodoTelescope<CR>')
|
||||||
|
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
-- Trouble
|
-- Trouble
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
@ -83,6 +86,9 @@ map('n', '<leader>xl', '<cmd>TroubleToggle loclist<CR>')
|
||||||
-- Show LSP references
|
-- Show LSP references
|
||||||
map('n', '<leader>xr', '<cmd>TroubleToggle lsp_references<CR>')
|
map('n', '<leader>xr', '<cmd>TroubleToggle lsp_references<CR>')
|
||||||
|
|
||||||
|
-- Show project TODOs in Trouble
|
||||||
|
map('n', '<leader>xt', '<cmd>TodoTrouble<CR>')
|
||||||
|
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
-- Floaterm
|
-- Floaterm
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
|
@ -71,7 +71,7 @@ return require('packer').startup(function(use)
|
||||||
use {
|
use {
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
requires = {
|
requires = {
|
||||||
'hrsh7th/cmp-nvim-lsp', -- add once LSP is supported
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
'hrsh7th/cmp-buffer'
|
'hrsh7th/cmp-buffer'
|
||||||
}
|
}
|
||||||
|
@ -130,9 +130,6 @@ return require('packer').startup(function(use)
|
||||||
-- Improve startup time by replacing default filetype autocmds
|
-- Improve startup time by replacing default filetype autocmds
|
||||||
use 'nathom/filetype.nvim'
|
use 'nathom/filetype.nvim'
|
||||||
|
|
||||||
-- Improve the core vim.ui
|
|
||||||
use 'stevearc/dressing.nvim'
|
|
||||||
|
|
||||||
-- Special highlighting and tracking for certain notable words
|
-- Special highlighting and tracking for certain notable words
|
||||||
use {
|
use {
|
||||||
'folke/todo-comments.nvim',
|
'folke/todo-comments.nvim',
|
||||||
|
|
|
@ -4,7 +4,7 @@ cmp.setup{
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
{ name = 'buffer', option = { keyword_length = 3 }, },
|
{ name = 'buffer', option = { keyword_length = 4 }, },
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
['<CR>'] = cmp.mapping.confirm({}),
|
['<CR>'] = cmp.mapping.confirm({}),
|
||||||
|
|
|
@ -6,10 +6,10 @@ local on_attach = function(client, bufnr)
|
||||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
end
|
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()
|
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)
|
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||||
|
|
||||||
-- zls = zig language server
|
-- zls = zig language server
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
-- Awaiting metals setup
|
|
||||||
local function metals_status_for_lualine()
|
local function metals_status_for_lualine()
|
||||||
return vim.g["metals_status"] or ""
|
return vim.g["metals_status"] or ""
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
-- One of "all", "maintained", or a list of languages
|
-- One of "all", "maintained", or a list of languages
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"c", "zig", "bash", "scala", "yaml", "html", "css", "javascript",
|
"c", "zig", "bash", "scala", "yaml", "css", "javascript",
|
||||||
"latex", "clojure", "lua", "cpp"
|
"latex", "clojure", "lua", "cpp"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue