1
0
Fork 0

nvim: misc

This commit is contained in:
Vladimír Dudr 2025-04-15 07:54:40 +02:00
parent e6f4dced59
commit 2d102dadc5
2 changed files with 24 additions and 16 deletions

View file

@ -2,7 +2,15 @@ local server_configs = function()
return { return {
ansiblels = {}, ansiblels = {},
powershell_es = {}, powershell_es = {},
gopls = {}, gopls = {
settings = {
gopls = {
codelenses = {
test = true,
},
},
},
},
templ = {}, templ = {},
clangd = {}, clangd = {},
zls = {}, zls = {},
@ -171,7 +179,7 @@ local function on_attach(args) -- {{{
end end
-- null-ls has mostly no hover and therefore trashes manpages for shell -- null-ls has mostly no hover and therefore trashes manpages for shell
if client.supports_method('textDocument/hover') and client.name ~= 'null-ls' then if client:supports_method('textDocument/hover') and client.name ~= 'null-ls' then
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover')) vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
end end
@ -370,6 +378,7 @@ local res = {
config = config, config = config,
cmd = { 'LspInfo', 'LspLog', 'LspStart' }, cmd = { 'LspInfo', 'LspLog', 'LspStart' },
dependencies = { dependencies = {
{ 'kcl-lang/kcl.nvim' },
{ 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim { 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' }, { 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
{ {
@ -384,7 +393,8 @@ local res = {
'williamboman/mason-lspconfig.nvim', 'williamboman/mason-lspconfig.nvim',
lazy = true, lazy = true,
dependencies = { 'williamboman/mason.nvim' }, dependencies = { 'williamboman/mason.nvim' },
config = config_mason_lsp, opts = { automatic_installation = true },
-- config = config_mason_lsp,
}, },
{ {
'simrat39/rust-tools.nvim', 'simrat39/rust-tools.nvim',
@ -407,9 +417,9 @@ local res = {
lazy = true, lazy = true,
config = function() config = function()
require('schema-companion').setup({ require('schema-companion').setup({
schemas = {}, schemas = {},
enable_telescope = true, enable_telescope = true,
log_level = vim.log.levels.INFO, log_level = vim.log.levels.INFO,
matchers = { matchers = {
require('schema-companion.matchers.kubernetes').setup({ version = 'master' }), require('schema-companion.matchers.kubernetes').setup({ version = 'master' }),
}, },

View file

@ -12,17 +12,6 @@ local M = {
function M.config() function M.config()
local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs() local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
-- ts_parsers.xml = {
-- install_info = {
-- url = 'https://github.com/dorgnarg/tree-sitter-xml', -- local path or git repo
-- files = { 'src/parser.c' },
-- -- optional entries:
-- branch = 'main', -- default branch in case of git repo if different from master
-- generate_requires_npm = false, -- if stand-alone parser without npm dependencies
-- requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
-- },
-- filetype = 'xml', -- if filetype does not match the parser name
-- }
ts_parsers.just = { ts_parsers.just = {
install_info = { install_info = {
url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo
@ -31,6 +20,14 @@ function M.config()
branch = 'main', -- default branch in case of git repo if different from master branch = 'main', -- default branch in case of git repo if different from master
}, },
} }
ts_parsers.kcl = {
install_info = {
url = 'https://github.com/kcl-lang/tree-sitter-kcl', -- local path or git repo
files = { 'src/parser.c', 'src/scanner.c' },
-- optional entries:
branch = 'main', -- default branch in case of git repo if different from master
},
}
require 'nvim-treesitter.configs'.setup { require 'nvim-treesitter.configs'.setup {
@ -38,6 +35,7 @@ function M.config()
ignore_install = {}, ignore_install = {},
auto_install = true, auto_install = true,
sync_install = false, sync_install = false,
modules = {},
refactor = { refactor = {
highlight_current_scope = { enable = false }, highlight_current_scope = { enable = false },
smart_rename = { smart_rename = {