Neovim: add signature help plugin + make use of quotes consistent

This commit is contained in:
Marko Korhonen 2022-08-14 20:36:32 +03:00
parent ae3b1f5db4
commit 3a918ea5fe
No known key found for this signature in database
GPG Key ID: 911B85FBC6003FE5
7 changed files with 35 additions and 29 deletions

View File

@ -1 +1 @@
require("bufferline").setup{} require('bufferline').setup{}

View File

@ -1,11 +1,11 @@
require("catppuccin").setup({ require('catppuccin').setup({
transparent_background = false, transparent_background = false,
term_colors = false, term_colors = false,
compile = {enabled = true, path = vim.fn.stdpath "cache" .. "/catppuccin"}, compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'},
styles = { styles = {
comments = {"italic"}, comments = {'italic'},
functions = {"italic"}, functions = {'italic'},
keywords = {"italic"}, keywords = {'italic'},
strings = {}, strings = {},
variables = {} variables = {}
}, },
@ -14,16 +14,16 @@ require("catppuccin").setup({
native_lsp = { native_lsp = {
enabled = true, enabled = true,
virtual_text = { virtual_text = {
errors = {"italic"}, errors = {'italic'},
hints = {"italic"}, hints = {'italic'},
warnings = {"italic"}, warnings = {'italic'},
information = {"italic"} information = {'italic'}
}, },
underlines = { underlines = {
errors = {"underline"}, errors = {'underline'},
hints = {"underline"}, hints = {'underline'},
warnings = {"underline"}, warnings = {'underline'},
information = {"underline"} information = {'underline'}
} }
}, },
lsp_trouble = false, lsp_trouble = false,

View File

@ -54,4 +54,4 @@ cmp.setup {
} }
-- load friendly-snippets to luasnip -- load friendly-snippets to luasnip
require("luasnip/loaders/from_vscode").lazy_load() require('luasnip/loaders/from_vscode').lazy_load()

View File

@ -1,7 +1,7 @@
vim.opt.list = true vim.opt.list = true
require("indent_blankline").setup { require('indent_blankline').setup {
space_char_blankline = " ", space_char_blankline = ' ',
show_current_context = true, show_current_context = true,
show_current_context_start = true, show_current_context_start = true,
} }

View File

@ -1,4 +1,4 @@
local lsp_installer = require("nvim-lsp-installer") local lsp_installer = require('nvim-lsp-installer')
local M = {} local M = {}
@ -47,15 +47,18 @@ end
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- Setup LSP signature plugin
require('lsp_signature').setup()
-- Register a handler that will be called for all installed servers. -- Register a handler that will be called for all installed servers.
lsp_installer.on_server_ready(function(server) lsp_installer.on_server_ready(function(server)
-- Don't setup jdtls here since it is done by nvim-jdtls -- Don't setup jdtls here since it is done by nvim-jdtls
if server.name == "jdtls" then return end if server.name == 'jdtls' then return end
local opts = {} local opts = {}
-- Lua specific settings -- Lua specific settings
if server.name == "sumneko_lua" then if server.name == 'sumneko_lua' then
local runtime_path = vim.split(package.path, ';') local runtime_path = vim.split(package.path, ';')
opts.settings = { opts.settings = {
Lua = { Lua = {
@ -71,7 +74,7 @@ lsp_installer.on_server_ready(function(server)
}, },
workspace = { workspace = {
-- Make the server aware of Neovim runtime files -- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true) library = vim.api.nvim_get_runtime_file('', true)
}, },
-- Do not send telemetry data containing a randomized but unique identifier -- Do not send telemetry data containing a randomized but unique identifier
telemetry = {enable = false} telemetry = {enable = false}

View File

@ -1,8 +1,8 @@
require'nvim-treesitter.configs'.setup { require'nvim-treesitter.configs'.setup {
ensure_installed = { ensure_installed = {
"bash", "c", "css", "dockerfile", "html", "http", "java", "json", 'bash', 'c', 'css', 'dockerfile', 'html', 'http', 'java', 'json',
"json5", "latex", "lua", "make", "markdown", "php", "python", "regex", 'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python', 'regex',
"rst", "scss", "toml", "tsx", "typescript", "javascript", "yaml" 'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript', 'yaml'
}, },
highlight = {enable = true}, highlight = {enable = true},
indent = {enable = true}, indent = {enable = true},

View File

@ -20,7 +20,7 @@ require('packer').startup(function()
use {'wbthomason/packer.nvim', opt = true} use {'wbthomason/packer.nvim', opt = true}
-- Colorscheme -- Colorscheme
use({"catppuccin/nvim", as = "catppuccin"}) use({'catppuccin/nvim', as = 'catppuccin'})
-- Git in signcolumn -- Git in signcolumn
use 'airblade/vim-gitgutter' use 'airblade/vim-gitgutter'
@ -34,7 +34,7 @@ require('packer').startup(function()
-- Tabline/bufferline -- Tabline/bufferline
use { use {
'akinsho/nvim-bufferline.lua', 'akinsho/nvim-bufferline.lua',
tag = "*", tag = '*',
requires = 'kyazdani42/nvim-web-devicons' requires = 'kyazdani42/nvim-web-devicons'
} }
@ -42,7 +42,7 @@ require('packer').startup(function()
use 'tpope/vim-fugitive' use 'tpope/vim-fugitive'
-- Indent characters -- Indent characters
use "lukas-reineke/indent-blankline.nvim" use 'lukas-reineke/indent-blankline.nvim'
-- Tree explorer -- Tree explorer
use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'} use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'}
@ -70,13 +70,16 @@ require('packer').startup(function()
-- Additional LSP features for Java -- Additional LSP features for Java
use 'mfussenegger/nvim-jdtls' use 'mfussenegger/nvim-jdtls'
-- Display function signature
use {'ray-x/lsp_signature.nvim'}
-- Completion -- Completion
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp
use 'hrsh7th/cmp-path' -- Path source for nvim-cmp use 'hrsh7th/cmp-path' -- Path source for nvim-cmp
use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp
use 'L3MON4D3/LuaSnip' -- Snippets plugin use 'L3MON4D3/LuaSnip' -- Snippets plugin
use "rafamadriz/friendly-snippets" -- Snippets collection use 'rafamadriz/friendly-snippets' -- Snippets collection
-- treesitter syntax highlight -- treesitter syntax highlight
use { use {
@ -118,7 +121,7 @@ require('packer').startup(function()
use 'habamax/vim-asciidoctor' use 'habamax/vim-asciidoctor'
-- Modern filetype.vim replacement -- Modern filetype.vim replacement
use("nathom/filetype.nvim") use('nathom/filetype.nvim')
end) end)