Compare commits
3 Commits
3b7c034926
...
08784c625a
| Author | SHA1 | Date | |
|---|---|---|---|
| 08784c625a | |||
| 59f4064788 | |||
| 74baebf3f8 |
@@ -1,31 +1,3 @@
|
|||||||
-- an alternative might be:
|
|
||||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
||||||
local function breadcrumb()
|
|
||||||
local result = require 'nvim-treesitter'.statusline(
|
|
||||||
{
|
|
||||||
type_patterns = {
|
|
||||||
"class",
|
|
||||||
"impl",
|
|
||||||
"function",
|
|
||||||
"method",
|
|
||||||
"import",
|
|
||||||
"for",
|
|
||||||
"if",
|
|
||||||
"while",
|
|
||||||
"variable",
|
|
||||||
"comment",
|
|
||||||
},
|
|
||||||
separator = " ▶ "
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if result == "" then
|
|
||||||
result = ' '
|
|
||||||
elseif result == nil then
|
|
||||||
result = ''
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
require("lualine").setup {
|
require("lualine").setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
icons_enabled = false,
|
||||||
@@ -63,22 +35,7 @@
|
|||||||
lualine_z = { 'location' }
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
winbar = {
|
winbar = {}, -- formerly breadcrumb here
|
||||||
lualine_a = {
|
inactive_winbar = {},
|
||||||
{
|
|
||||||
breadcrumb,
|
|
||||||
color = { bg = '#2a2a2a', fg = '#cfcfcf' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
inactive_winbar = {
|
|
||||||
lualine_a = {
|
|
||||||
{
|
|
||||||
breadcrumb,
|
|
||||||
color = { bg = '#101010', fg = '#999999' },
|
|
||||||
draw_empty = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {}
|
extensions = {}
|
||||||
}
|
}
|
||||||
|
|||||||
36
lua/lsp.lua
36
lua/lsp.lua
@@ -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
|
||||||
|
local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
|
||||||
|
local vue_plugin = {
|
||||||
|
name = '@vue/typescript-plugin',
|
||||||
|
location = vue_language_server_path,
|
||||||
|
languages = { 'vue' },
|
||||||
|
configNamespace = 'typescript',
|
||||||
|
}
|
||||||
|
local vtsls_config = {
|
||||||
|
settings = {
|
||||||
|
vtsls = {
|
||||||
|
tsserver = {
|
||||||
|
globalPlugins = {
|
||||||
|
vue_plugin,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||||
init_options = {
|
}
|
||||||
vue = {
|
vim.lsp.config('vtsls', vtsls_config)
|
||||||
-- disable hybrid mode, will thus use ts_ls internally
|
|
||||||
hybridMode = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
-- 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user