Skip to content

Commit

Permalink
Update configuration to newest version of Neovim.
Browse files Browse the repository at this point in the history
  • Loading branch information
Milton Montero committed Nov 1, 2022
1 parent 68cc8b5 commit 96bb7ae
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lua/lsp/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function M.common_on_attach(client, bufnr)
-- Markdown preview TODO: make this conditional, but I also don't use it all that much
-- bufnnnoremap("<leader>P", "<Cmd>Glow<CR>")

if client.resolved_capabilities.document_formatting then
if client.server_capabilities.document_formatting then
cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()")
end
end
Expand Down
8 changes: 5 additions & 3 deletions lua/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ vim.o.showmode = false
vim.o.showtabline = 2 -- Always show tabline
vim.o.title = true
vim.o.termguicolors = true -- Use true colors, required for some plugins
-- vim.o.ls = 0 -- Doesn't seem to work
-- vim.o.ch = 0 -- Creates a bug with output messages not appearing correctly
vim.wo.number = true
vim.wo.relativenumber = true
vim.wo.signcolumn = 'yes'
vim.wo.cursorline = true

-- Behaviour
-- Behavior
vim.o.hlsearch = false
vim.o.ignorecase = true -- Ignore case when using lowercase in search
vim.o.smartcase = true -- But don't ignore it when using upper case
Expand All @@ -30,15 +32,15 @@ vim.o.mouse = 'a'
-- Vim specific
vim.o.hidden = true -- Do not save when switching buffers
vim.o.fileencoding = "utf-8"
vim.o.spell = false
vim.o.spell = true -- As of v0.8.0 it only checks comments
vim.o.spelllang = "en_us"
vim.o.completeopt = "menuone,noinsert,noselect"
vim.o.wildmode = "longest,full" -- Display auto-complete in Command Mode
vim.o.updatetime = 300 -- Delay until write to Swap and HoldCommand event
vim.g.do_file_type_lua = 1

-- Disable default plugins
-- vim.g.loaded_netrwPlugin = false -- This had an issue but I can't remember now.
-- vim.g.loaded_netrwPlugin = false -- I can't remember what the issue was with this option

-- Python providers
local pynvim_env = "/.local/bin/pyenv/versions/pynvim/"
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ return require('packer').startup(function(use)
use 'jeetsukumaran/vim-python-indent-black'

-- Python
-- use 'heavenshell/vim-pydocstring' -- Overwrites a keymap, need to fix.
-- use 'heavenshell/vim-pydocstring' -- Overwrites a keymap, need to fix.
-- use 'bfredl/nvim-ipy'

-- Markdown
Expand Down
4 changes: 2 additions & 2 deletions lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local common_on_attach = utils.common_on_attach

-- add capabilities from nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)

-- Enable language servers with common settings
local servers = {"bashls", "clangd", "pyright", "jsonls", "dockerls"}
Expand All @@ -15,7 +15,7 @@ for _, lsp in ipairs(servers) do
})
end

require('lsp.sumneko')
-- require('lsp.sumneko')

-- signature help hover
require "lsp_signature".setup({ })
Expand Down
10 changes: 5 additions & 5 deletions lua/themes.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-- Themes

-- TokioNight
-- vim.g.tokyonight_style = 'night'
-- vim.g.tokyonight_italic_comments = false
-- vim.cmd [[colorscheme tokyonight]]
vim.g.tokyonight_style = 'night'
vim.g.tokyonight_italic_comments = false
vim.cmd [[colorscheme tokyonight]]

-- Material
vim.g.material_style = 'oceanic'
vim.cmd [[colorscheme material]]
-- vim.g.material_style = 'oceanic'
-- vim.cmd [[colorscheme material]]

0 comments on commit 96bb7ae

Please sign in to comment.