Compare commits

..

3 Commits

Author SHA1 Message Date
08784c625a Migrated to vue-language-server 3.0.x 2025-07-21 10:26:11 +02:00
59f4064788 Orgmode mappings <C-M-(left,right)> to promote/demote subtree, diags no multiline 2025-07-21 10:25:28 +02:00
74baebf3f8 Lualine: dropped breadcrumb winbar, was not in use at all
- research turned up no usable plugin or method to display stuff I
  really want or need to know.
2025-07-11 21:34:30 +02:00
3 changed files with 68 additions and 98 deletions

View File

@@ -1,84 +1,41 @@
-- an alternative might be: require("lualine").setup {
-- https://github.com/nvim-treesitter/nvim-treesitter-context options = {
local function breadcrumb() icons_enabled = false,
local result = require 'nvim-treesitter'.statusline( theme = 'papercolor_light',
{ component_separators = {},
type_patterns = { section_separators = {},
"class", disabled_filetypes = {
"impl", statusline = {},
"function", winbar = { "neo-tree" },
"method", },
"import", ignore_focus = {},
"for", always_divide_middle = true,
"if", globalstatus = false,
"while", refresh = {
"variable", statusline = 1000,
"comment", tabline = 1000,
}, winbar = 1000,
separator = "" }
} },
) sections = {
if result == "" then lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
result = ' ' lualine_b = { 'branch', 'diff', 'diagnostics' },
elseif result == nil then lualine_c = {},
result = '' lualine_x = { 'encoding', 'fileformat', 'filetype', 'lsp_status' },
end lualine_y = { 'filesize' },
return result lualine_z = { 'progress', 'location' }
end },
inactive_sections = {
require("lualine").setup { lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
options = { lualine_b = {},
icons_enabled = false, lualine_c = {},
theme = 'papercolor_light', -- lualine_x = { 'encoding', 'fileformat', 'filetype' },
component_separators = {}, lualine_x = {},
section_separators = {}, lualine_y = { 'filesize' },
disabled_filetypes = { lualine_z = { 'location' }
statusline = {}, },
winbar = { "neo-tree" }, tabline = {},
}, winbar = {}, -- formerly breadcrumb here
ignore_focus = {}, inactive_winbar = {},
always_divide_middle = true, extensions = {}
globalstatus = false, }
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = {},
lualine_x = { 'encoding', 'fileformat', 'filetype', 'lsp_status' },
lualine_y = { 'filesize' },
lualine_z = { 'progress', 'location' }
},
inactive_sections = {
lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
lualine_b = {},
lualine_c = {},
-- lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_x = {},
lualine_y = { 'filesize' },
lualine_z = { 'location' }
},
tabline = {},
winbar = {
lualine_a = {
{
breadcrumb,
color = { bg = '#2a2a2a', fg = '#cfcfcf' },
},
},
},
inactive_winbar = {
lualine_a = {
{
breadcrumb,
color = { bg = '#101010', fg = '#999999' },
draw_empty = true
}
},
},
extensions = {}
}

View File

@@ -65,26 +65,40 @@ function LSPRangeFormatFunction()
}) })
end end
-- Set different settings for different languages' LSP
-- use globally installed vue-language-server (instead of mason provided) -- VUE and Typescript as of vue-language-server 3.0.x
vim.lsp.config('vue_ls', { -- taken from:
-- add filetypes for typescript, javascript and vue -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#vtsls
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }, local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
init_options = { local vue_plugin = {
vue = { name = '@vue/typescript-plugin',
-- disable hybrid mode, will thus use ts_ls internally location = vue_language_server_path,
hybridMode = false, languages = { 'vue' },
configNamespace = 'typescript',
}
local vtsls_config = {
settings = {
vtsls = {
tsserver = {
globalPlugins = {
vue_plugin,
},
},
}, },
}, },
}) filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
}
vim.lsp.config('vtsls', vtsls_config)
-- enable this list of lsps
local enable_this_lsp = { local enable_this_lsp = {
'vue_ls', 'vue_ls',
'vtsls',
'gopls', 'gopls',
'bashls', 'bashls',
'html', 'html',
'lua_ls', 'lua_ls',
'jsonls',
} }
for l in pairs(enable_this_lsp) do for l in pairs(enable_this_lsp) do

View File

@@ -168,10 +168,13 @@ require("lazy").setup({
config = function() config = function()
-- Setup orgmode -- Setup orgmode
require('orgmode').setup({ require('orgmode').setup({
-- cf: https://github.com/nvim-orgmode/orgmode/blob/master/docs/configuration.org#mappings
mappings = { mappings = {
org = { org = {
org_move_subtree_up = { '<Leader>oK', '<C-M-Up>' }, org_move_subtree_up = { '<Leader>oK', '<C-M-Up>' },
org_move_subtree_down = { '<Leader>oJ', '<C-M-Down>' }, org_move_subtree_down = { '<Leader>oJ', '<C-M-Down>' },
org_promote_subtree = { '<s', '<C-M-Left>' },
org_demote_subtree = { '>s', '<C-M-Right>' },
} }
}, },
-- org_agenda_files = '~/orgfiles/**/*', -- org_agenda_files = '~/orgfiles/**/*',
@@ -607,10 +610,6 @@ require("lazy").setup({
use_icons_from_diagnostic = true, use_icons_from_diagnostic = true,
enable_on_insert = true, enable_on_insert = true,
show_all_diags_on_cursorline = true, show_all_diags_on_cursorline = true,
multilines = {
enabled = true,
always_show = true,
}
} }
}) })
vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics