mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(neovim): AWK LSP with required workarounds
- Disable lspsaga -> symbol_in_winbar for awk files
This commit is contained in:
@@ -16,13 +16,12 @@ require("config.autocmd")
|
|||||||
-- NOTE: External Tools needed for this Nvim config to work
|
-- NOTE: External Tools needed for this Nvim config to work
|
||||||
-- jsregexp
|
-- jsregexp
|
||||||
-- rust-analyzer, rustc, cargo (rustacean)
|
-- rust-analyzer, rustc, cargo (rustacean)
|
||||||
-- OS Installs: Use ../../../scripts/install.sh
|
-- OS Installs:
|
||||||
-- general: curl, gzip, unzip, git, fd-find, ripgrep, fzf, tree-sitter
|
-- general: curl, gzip, unzip, git, fd-find, ripgrep, fzf, tree-sitter
|
||||||
-- tools: ImageMagick, xclip, xsel, ghostscript
|
-- tools: ImageMagick, xclip, xsel, ghostscript
|
||||||
-- lsp: codespell, nodejs-bash-language-server, hadolint, lua, luajit, shellcheck, shfmt, trivy, pylint, stylua
|
-- lsp: ../../../scripts/package-list-os
|
||||||
-- Brew:
|
-- Brew:
|
||||||
-- tools: lazygit
|
-- tools: lazygit
|
||||||
-- lsp: dockerfile-language-server, markdown-toc, markdownlint-cli, marksman, prettier, prettierd, python-lsp-server,
|
-- lsp: ../../../scripts/package-list-brew
|
||||||
-- taplo, typescript-language-server, vue-language-server, yaml-language-server, yamlfmt
|
-- MasonInstallAll to install the rest:
|
||||||
-- MasonInstallAll to install the rest (./lua/config/autocmd.lua)
|
-- (./lua/config/autocmd.lua)
|
||||||
-- codelldb, css-lsp, docker-compose-language-service, html-lsp, json-lsp, sqlls
|
|
||||||
|
|||||||
3
common/.config/nvim/lsp/awk_ls.lua
Normal file
3
common/.config/nvim/lsp/awk_ls.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
filetypes = { "awk" },
|
||||||
|
}
|
||||||
@@ -28,5 +28,5 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
|||||||
|
|
||||||
-- New command: MasonInstallAll
|
-- New command: MasonInstallAll
|
||||||
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
||||||
vim.cmd("MasonInstall codelldb css-lsp docker-compose-language-service html-lsp json-lsp sqlls")
|
vim.cmd("MasonInstall awk-language-server codelldb css-lsp docker-compose-language-service html-lsp json-lsp sqlls")
|
||||||
end, {})
|
end, {})
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
-- Step 4: Return a lua table containing required lsp config in it
|
-- Step 4: Return a lua table containing required lsp config in it
|
||||||
-- NOTE: Only LSPs here, NOT linters or formatter
|
-- NOTE: Only LSPs here, NOT linters or formatter
|
||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
|
"awk_ls",
|
||||||
"basedpyright",
|
"basedpyright",
|
||||||
"bashls",
|
"bashls",
|
||||||
"cssls",
|
"cssls",
|
||||||
|
|||||||
@@ -111,11 +111,13 @@ return {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"nvimdev/lspsaga.nvim",
|
"nvimdev/lspsaga.nvim",
|
||||||
|
event = { "FileType" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
local disabled_filetypes = { "awk" }
|
||||||
require("lspsaga").setup({
|
require("lspsaga").setup({
|
||||||
ui = {
|
ui = {
|
||||||
kind = require("config.util").icons.kind_lspsaga,
|
kind = require("config.util").icons.kind_lspsaga,
|
||||||
@@ -128,7 +130,10 @@ return {
|
|||||||
sign = true,
|
sign = true,
|
||||||
priority = 100,
|
priority = 100,
|
||||||
},
|
},
|
||||||
symbol_in_winbar = { enable = true, hide_keyword = true },
|
symbol_in_winbar = {
|
||||||
|
enable = not vim.tbl_contains(disabled_filetypes, vim.bo.filetype),
|
||||||
|
hide_keyword = true,
|
||||||
|
},
|
||||||
lightbulb = { virtual_text = false },
|
lightbulb = { virtual_text = false },
|
||||||
outline = { auto_preview = false },
|
outline = { auto_preview = false },
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user