Merge pull request 'Neovim config updates' (#12) from nvim-updates-10162022 into main
Reviewed-on: https://git.softinio.com/softinio/nix-config/pulls/12
This commit is contained in:
commit
bc892f2efd
1 changed files with 32 additions and 6 deletions
|
@ -11,7 +11,7 @@ local function load_plugins()
|
||||||
use 'nvim-treesitter/nvim-treesitter-textobjects'
|
use 'nvim-treesitter/nvim-treesitter-textobjects'
|
||||||
use 'nvim-treesitter/playground'
|
use 'nvim-treesitter/playground'
|
||||||
use 'folke/which-key.nvim'
|
use 'folke/which-key.nvim'
|
||||||
use 'folke/lua-dev.nvim'
|
use 'folke/neodev.nvim'
|
||||||
use 'folke/tokyonight.nvim' -- Theme
|
use 'folke/tokyonight.nvim' -- Theme
|
||||||
use { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons' }
|
use { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons' }
|
||||||
use { 'justinhj/battery.nvim', requires = {{'kyazdani42/nvim-web-devicons'}, {'nvim-lua/plenary.nvim'}}}
|
use { 'justinhj/battery.nvim', requires = {{'kyazdani42/nvim-web-devicons'}, {'nvim-lua/plenary.nvim'}}}
|
||||||
|
@ -20,7 +20,13 @@ local function load_plugins()
|
||||||
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||||
use { 'softinio/scaladex.nvim' }
|
use { 'softinio/scaladex.nvim' }
|
||||||
use 'windwp/nvim-autopairs' -- Autopairs
|
use 'windwp/nvim-autopairs' -- Autopairs
|
||||||
use 'kyazdani42/nvim-tree.lua' -- File explorer
|
use {
|
||||||
|
'nvim-tree/nvim-tree.lua',
|
||||||
|
requires = {
|
||||||
|
'nvim-tree/nvim-web-devicons', -- optional, for file icons
|
||||||
|
},
|
||||||
|
tag = 'nightly' -- optional, updated every week. (see issue #1193)
|
||||||
|
}
|
||||||
use {
|
use {
|
||||||
'glepnir/galaxyline.nvim',
|
'glepnir/galaxyline.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -192,7 +198,27 @@ _G.load_config = function()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- nvim-tree
|
-- nvim-tree
|
||||||
require('nvim-tree').setup()
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
require("nvim-tree").setup({
|
||||||
|
sort_by = "case_sensitive",
|
||||||
|
disable_netrw = true,
|
||||||
|
view = {
|
||||||
|
adaptive_size = true,
|
||||||
|
mappings = {
|
||||||
|
list = {
|
||||||
|
{ key = "u", action = "dir_up" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
renderer = {
|
||||||
|
highlight_git = true,
|
||||||
|
group_empty = true,
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
|
@ -481,7 +507,7 @@ _G.load_config = function()
|
||||||
table.insert(runtime_path, 'lua/?.lua')
|
table.insert(runtime_path, 'lua/?.lua')
|
||||||
table.insert(runtime_path, 'lua/?/init.lua')
|
table.insert(runtime_path, 'lua/?/init.lua')
|
||||||
|
|
||||||
local luadev = require('lua-dev').setup{
|
local neodev = require('neodev').setup{
|
||||||
lspconfig = {
|
lspconfig = {
|
||||||
cmd = { sumneko_binary },
|
cmd = { sumneko_binary },
|
||||||
commands = {
|
commands = {
|
||||||
|
@ -518,7 +544,7 @@ _G.load_config = function()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
nvim_lsp.sumneko_lua.setup(luadev)
|
nvim_lsp.sumneko_lua.setup(neodev)
|
||||||
|
|
||||||
-- metals
|
-- metals
|
||||||
vim.g.metals_server_version = '0.11.9'
|
vim.g.metals_server_version = '0.11.9'
|
||||||
|
@ -546,7 +572,7 @@ _G.load_config = function()
|
||||||
end
|
end
|
||||||
metals_config.init_options.statusBarProvider = "on"
|
metals_config.init_options.statusBarProvider = "on"
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
metals_config.capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||||
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
|
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "scala", "sbt" },
|
pattern = { "scala", "sbt" },
|
||||||
|
|
Loading…
Reference in a new issue