Comments (5)
or if i do the require('telescope').load_extension('sfm-telescope')
before the lazy-install this erorr shows up
from sfm.nvim.
Can I have your dotfile?
from sfm.nvim.
sure here are those
The lazy.nvim
require("lazy").setup({
-- Sfm | File manager
{ import = "Fm.Sfm" },
}, {})
The Fm.Sfm
-- ╭──────────╮
-- │ SFM CONF │
-- ╰──────────╯
vim.keymap.set("n", "<leader>e", "<cmd>SFMToggle<CR>",{desc ="SFM Tree"} ) -- toogle exp file
return {
'dinhhuy258/sfm.nvim',
cmd = "SFMToggle",
dependencies = {
{ "dinhhuy258/sfm-bookmark.nvim" },
{ "dinhhuy258/sfm-filter.nvim" },
{ "dinhhuy258/sfm-git.nvim" },
{ "dinhhuy258/sfm-telescope.nvim" },
{ "dinhhuy258/sfm-paste.nvim" },
},
opts = {
load_extension = {"sfm-git"}, -- this surely donsent' work at all ❌
view = {
side = "left", -- side of the tree, can be `left`, `right`. this setting will be ignored if view.float.enable is set to true,
width = 27, -- this setting will be ignored if view.float.enable is set to true,
float = {
enable = false,
config = {
relative = "editor",
border = "rounded",
width = 30, -- int or function
height = 30, -- int or function
row = 1, -- int or function
col = 1 -- int or function
}
},
render_selection_in_sign = true
},
mappings = {
custom_only = true,
list = {
-- Edit
{ key = "l", action = "edit", }, -- just to open file to buffer
{ key = "<cr>", action = "edit", }, -- just to open file to buff
-- Change position
{ key = "h", action = "change_root_to_parent",}, --Change root dir, parent dir of the current entry
{ key = "ctr-]", action = "change_root_to_parent",}, --Change root dir, parent dir of the current entry
{ key = "o", action = "change_root_to_entry", }, --Change root dir, current folder entry or to the parent dir of current file entry
{ key = "<tab>", action = "change_root_to_entry", }, --Change root dir, current folder entry or to the parent dir of current file entry
{ key = "]", action = "change_root_to_entry", }, --Change root dir, current folder entry or to the parent dir of current file entry
-- Quit
{ key = "q", action = "close", },
{ key = "<esc>", action = "close", },
{ key = "<C-r>", action = "reload", }, -- Reload the explorer
-- Splits
{ key = "<C-h>", action = "vsplit" },
{ key = "<C-v>", action = "split" },
{ key = "<C-t>", action = "tabnew" },
-- Movement
-- { key = "u", action = "parent_entry",}, -- Move cursor to the parent directory
{ key = "<s-tab>",action = "close_entry", }, -- Close current opened directory or parent
{ key = "p", action = "parent_entry",}, -- Move cursor to the parent directory
{ key = "J", action = "first_sibling" }, -- Navigate to the first sibling of current file or directory
{ key = "K", action = "last_sibling" }, -- Navigate to the last sibling of current file or directory
-- FS
{ key = "R", action = "reload", }, -- Reload the explorer
{ key = "q", action = "close", }, -- Close the explorer window
{ key = "a", action = "create", }, -- Create a new file/directory in the current folder
{ key = "c", action = "copy", }, -- Copy the current file or directory to a destination path specified by the user
{ key = "p", action = "copy_selections", }, -- Copy all selected files or directories to the current folder
{ key = "r", action = "move", }, -- Move/rename the current file or directory
{ key = "x", action = "move_selections", }, -- Move all selected files or directories to the current folder
{ key = "dd", action = "delete", }, -- Delete the current file or directory
{ key = "ds", action = "delete_selections", }, -- Delete all selected files or directories
{ key = "v", action = "toggle_selection", }, -- Toggle the selection of the current file or directory
{ key = "C", action = "clear_selections", }, -- Clear all selections
-- trash Trash the current file or directory
-- trash_selections Trash all selected files or directories
-- { key = ";", action = "system_open", }, -- Open the selected file or directory using system default program
-- { key = "'", action = "system_open_selections", }, -- Open all selected files or directories using system default program --
},
},
renderer = {
icons = {
file = { default = "", symlink = "", },
folder = {
default = "", open = "",
symlink = "", symlink_open = "",
},
indicator = {
folder_closed = "",
folder_open = "",
file = " ",
},
selection = "",
}
},
misc = {
trash_cmd = nil
},
-- load_extension="sfm-filter"
},
}
from sfm.nvim.
Hi @NormTurtle, according to your dotfiles, you need to modify the setting slightly so that it can load the extension. Instead of using opts, you can use config in lazy, for example.
local keymap = require "utils.keymap"
return {
"dinhhuy258/sfm.nvim",
dependencies = {
"dinhhuy258/sfm-bookmark.nvim",
"dinhhuy258/sfm-filter.nvim",
"dinhhuy258/sfm-git.nvim",
"dinhhuy258/sfm-telescope.nvim",
"dinhhuy258/sfm-paste.nvim",
},
config = function()
local sfm_explorer = require("sfm").setup {
view = {
selection_render_method = "sign",
},
renderer = {
icons = {
selection = "*",
},
},
mappings = {
list = {
{
key = "<C-v>",
action = nil,
},
{
key = "<C-h>",
action = nil,
},
},
},
}
sfm_explorer:load_extension "sfm-bookmark"
sfm_explorer:load_extension "sfm-filter"
sfm_explorer:load_extension "sfm-git"
sfm_explorer:load_extension "sfm-telescope"
sfm_explorer:load_extension "sfm-paste"
keymap.set("n", "<F1>", "<CMD>SFMToggle<CR>", { noremap = true, silent = true })
keymap.set("n", "fm", "<CMD>SFMToggle<CR>", { noremap = true, silent = true })
end,
}
In your config file, you should change the config as follows:
return {
'dinhhuy258/sfm.nvim',
cmd = "SFMToggle",
dependencies = {
{ "dinhhuy258/sfm-bookmark.nvim" },
{ "dinhhuy258/sfm-filter.nvim" },
{ "dinhhuy258/sfm-git.nvim" },
{ "dinhhuy258/sfm-telescope.nvim" },
{ "dinhhuy258/sfm-paste.nvim" },
},
config = function()
local sfm_explorer = require("sfm").setup {
--- your config here
}
sfm_explorer:load_extension "sfm-git"
...
end
}
from sfm.nvim.
thank you , but i think there should be somethign which could support opts =
maybe?
but im closing issue thank you :)
from sfm.nvim.
Related Issues (17)
- `Width View` conflict with window.nvim HOT 8
- `<leader>` KEY CLASH HOT 8
- Considering integrate sfm-fs to sfm plugin
- Ui like `mini.files` HOT 2
- trash feature HOT 5
- Re-enable opening a file within a split HOT 1
- Can't open a file with a `#` in its name HOT 2
- Pick window when open file
- Allow user to customize to use their ui component such as nui.nvim HOT 5
- Add file nesting HOT 5
- Remove unused actions
- Implement missing actions: open_entry, open_all_entries, close_all_entries. HOT 5
- File actions HOT 2
- Support file operations event (such as file renamed, file deleted...) HOT 1
- Support float window
- `P` , `paren_entry`: not working ! HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfm.nvim.